Database: art_1
Question: What are the ids of the paintings created before all of the paintings in gallery 240?
SQL:
SELECT paintingID FROM paintings WHERE YEAR  <   (SELECT min(YEAR) FROM paintings WHERE LOCATION  =  'Gallery 240')