12345678910111213 |
- —-A compound condition without parenthese
- SELECT invoice_number, invoice_date, invoice_total,
- (invoice_total - payment_total - credit_total) AS balance_due
- FROM invoices
- WHERE invoice_date > '2014-07-03' OR invoice_total > 500
- AND invoice_total - payment_total - credit_total > 0;
-
- —The same compound condition with parentheses
- SELECT invoice_number, invoice_date, invoice_total,
- (invoice_total - payment_total - credit_total) AS balance_due
- FROM invoices
- WHERE (invoice_date > '2014-07-03' OR invoice_total > 500)
- AND invoice_total - payment_total - credit_total > 0;
|