programming-examples/sql/BooleanRelationalOperators/Display all in reverse, where order dates equal to a specified date or customer id greater than a specified number and purchase amount less than a specified amount.sql

7 lines
287 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Display all in reverse, where order dates equal to a specified date or
customer id greater than a specified number and purchase amount less than a specified amount. */
SELECT *
FROM orders
WHERE NOT((ord_date ='2012-08-17'
OR customer_id>3005)
AND purch_amt<1000);