0
Will you be able to solve this question in SQL?
The marketing department wants to focus on the customers from North America first. Gets the ID, last name and country of all customers. Build the list by bringing up the customers living in Canada and in the USA first, and finally ordered them by ID. Tip: Use the IN expression in the ORDER BY clause.
5 ответов
+ 2
Select CustomerID, Lastname, Country from Customers
order by Country IN (' U', 'Canada'), CustomerID ;
this works....i even tried !!!
0
Select CustomerId,LastName,Country FROM Customer ORDER BY Country IN ('USA','CANADA') desc, CustomerId
0
select ID, Name, Country
from customers
order by Country in ('US', 'Canada'), ID
0
can i take u back guys... hw abt if the database contain other countries will they be listed aswel or only USA and Canada?
0
Select ID, Lastname, Country from Customers
order by Country IN ('USA', 'Canada'), ID;