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
|
5512 Discussions
|
Please Login in order to post a comment
-> select Concat(Name,'(',Substring(occupation,1,1),')') as N from occupations order by name;
-> select 'There are a total of', + count(occupation), lower(concat(occupation,'s.')) from occupations group by occupation order by count(occupation), occupation ;
select concat(name,'(',(left(occupation, 1)),')') from OCCUPATIONS order by name;
select concat('There are a total of ' , count(occupation),' ', case when occupation = 'Doctor' then 'doctors' when occupation = 'Singer' then 'singers' when occupation = 'Actor' then 'actors' when occupation = 'Professor' then 'professors'
from occupations group by occupation order by count(occupation) asc, occupation asc
This works for me:
Hope the below solution helps-
SELECT Name || '' || '('|| '' || SUBSTR(Occupation,1,1) || '' || ')' FROM OCCUPATIONS order by name asc;
select 'There are a total of' || ' ' || count(Occupation) || ' ' || lower(Occupation) || '' || 's' from OCCUPATIONS group by occupation order by count(occupation),occupation asc;