+ 1
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 Réponses
+ 5
SELECT column_list
FROM customers
WHERE amount >= 38 AND (city = 'Paris' OR country = 'Brazil');
+ 2
Select fname,city,country,amount from table1 where country='brazil' or city ='paris' and amount›38
0
Select first name, city, country, invoiced amount from customers
where country = 'Brazil' or city ='paris'
and
Invoiced amount > 38
0
that worked! I was making syntax error country= . still getting to be comfortable with and or. thanks folks!
0
@Rosekamal Don't forget to use parenthesis when nesting or you may end up with a results table that could cause you some headaches.
0
select first name,city,country,invoiced amount from customers where country = 'Brazil' or 'city Paris' AND total invoice > $38
0
@K Crage - yea, it took me a while to get used to ordering AND OR with Parenthesis. that's a wise suggestion!
0
select firstname,city,country,invoice from customers where(country='Brazil' or city='Paris') and MAX(invoice)>38;
0
how many tables are their? do all these columns exists in same table?
0
select firstname,city,country,invoiced_amt from customers where country='Brazil' or city='Paris' and invoiced _amt>38
0
SELECT fname, city, country, invoice
FROM customerTable
WHERE (city = 'Paris' OR country = 'Brazil')
AND invoice >= 39;
- 2
SELECT first name, city, country
FROM column list
WHERE (country = 'Brazil' or city ='Paris' AND invoiceAmount > $38);