Need help to solve this question in SQL? Get the first name, city, country, and invoiced amount of customers living either in country Brazil or in city Paris and with a total invoice greater than $38.
12 Answers
New Answer12 Answers
New AnswerSELECT column_list FROM customers WHERE amount >= 38 AND (city = 'Paris' OR country = 'Brazil');
Select fname,city,country,amount from table1 where country='brazil' or city ='paris' and amount›38
Select first name, city, country, invoiced amount from customers where country = 'Brazil' or city ='paris' and Invoiced amount > 38
that worked! I was making syntax error country= . still getting to be comfortable with and or. thanks folks!
@Rosekamal Don't forget to use parenthesis when nesting or you may end up with a results table that could cause you some headaches.
select first name,city,country,invoiced amount from customers where country = 'Brazil' or 'city Paris' AND total invoice > $38
@K Crage - yea, it took me a while to get used to ordering AND OR with Parenthesis. that's a wise suggestion!
select firstname,city,country,invoice from customers where(country='Brazil' or city='Paris') and MAX(invoice)>38;
select firstname,city,country,invoiced_amt from customers where country='Brazil' or city='Paris' and invoiced _amt>38
SELECT fname, city, country, invoice FROM customerTable WHERE (city = 'Paris' OR country = 'Brazil') AND invoice >= 39;
SELECT first name, city, country FROM column list WHERE (country = 'Brazil' or city ='Paris' AND invoiceAmount > $38);
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message