Database: art_1
Question: Find the distinct ids of all paintings that are older than some painting at location gallery 240.
SQL:
SELECT paintingID FROM paintings WHERE YEAR  <  (SELECT max(YEAR) FROM paintings WHERE LOCATION  =  "Gallery 240")