human
Schema:
buildings (id, name, City, Height, Stories, Status)
Companies (id, name, Headquarters, Industry, Sales_billion, Profits_billion, Assets_billion, Market_Value_billion)
Office_locations (building_id, company_id, move_in_year)
Please answer with SQL.
assistant
Sure, I understand.
human
List the names of the buildings that have a status on-hold.
assistant
SELECT name FROM buildings WHERE Status = 'on-hold';
human
Also, list their height and number of stories.
assistant
SELECT name , height , stories FROM buildings WHERE Status = 'on-hold';
human
Actually just show the names and number of stories for each!
assistant
SELECT name , stories FROM buildings WHERE Status = 'on-hold';
human
Can you just show the names sorted by number of stories FROM least to greatest?
assistant
SELECT name FROM buildings WHERE Status = "on-hold" ORDER BY Stories ASC ;