We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Advanced Select
- The PADS
- Discussions
The PADS
The PADS
Sort by
recency
|
5052 Discussions
|
Please Login in order to post a comment
SELECT CONCAT(NAME,'(',LEFT(OCCUPATION, 1),')') FROM OCCUPATIONS order by name;
SELECT CONCAT('There are a total of ',COUNT(OCCUPATION)," ",lower(OCCUPATION), 's.') FROM OCCUPATIONS GROUP BY OCCUPATION order by count(occupation);
select concat(name,'(',substring(occupation,1,1),')') from occupations order by name asc; SELECT concat('There are a total of ',COUNT(*),' ',lower(occupation), 's.') as total FROM occupations GROUP BY occupation order by total asc
I thought you need to union all both the queries. Thought its very difficult problem lol.
select CONCAT(name,'(',substring(Occupation,1,1),')') AS Name_and_Occupation from OCCUPATIONS order by name;
select concat('There are a total of',' ',count(occupation),' ',lower(occupation),'s.') from occupations group by occupation order by count(occupation), lower(occupation);
Oracle: select name||'('||substr(occupation,1,1)||')' from occupations order by name; select 'There are a total of '||count(1)||' '||lower(occupation)||'s'||'.' from occupations group by occupation order by count(1), occupation;