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.
Thanks for the query using || ''|| because I am used to this. I forgot to lower(occupation) in query 2. but you are mising 'a' inside the fisrt line of 2nd query
select 'There are total' || ' ' ||
it will be select 'There are a total of' || ' ' ||
my comple query is :
select name ||'(' || substr((occupation), 1,1) || ')' as "Name"
from occupations
order by Name asc;
select 'There are a total of' || ' ' || count(occupation) || ' ' || lower(occupation) || 's.' as "Total"
from occupations group by occupation order by "Total";
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The PADS
You are viewing a single comment's thread. Return to all comments →
Thanks for the query using || ''|| because I am used to this. I forgot to lower(occupation) in query 2. but you are mising 'a' inside the fisrt line of 2nd query select 'There are total' || ' ' ||
it will be select 'There are a total of' || ' ' ||
my comple query is :
select name ||'(' || substr((occupation), 1,1) || ')' as "Name" from occupations order by Name asc;
select 'There are a total of' || ' ' || count(occupation) || ' ' || lower(occupation) || 's.' as "Total" from occupations group by occupation order by "Total";