SELECT "column_name" FROM "table_name" WHERE "simple condition" {[AND|OR] "simple condition"}+
ตาราง Store_Information
store_name | Sales | Date |
Los Angeles | $1500 | Jan-05-1999 |
San Diego | $250 | Jan-07-1999 |
San Francisco | $300 | Jan-08-1999 |
Boston | $700 | Jan-08-1999 |
การใช้งาน
SELECT store_name FROM Store_Information WHERE Sales > 1000 OR (Sales < 500 AND Sales > 275)
ผลลัพธิ์ที่ได้
store_name | Sales | Date |
Los Angeles | $1500 | Jan-05-1999 |
San Francisco | $300 | Jan-08-1999 |