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.
Why as to this is wrong? and how can I correct it?
With ABC as (
Select Concat(Name,"(",Substr(occupation,1,1),")") from (Select Name, occupation from OCCUPATIONS order by 1) A
),
XYZ as (
Select Concat("There are a total of ",cnt , " ",occupation ) from (Select occupation,count(occupation) as cnt from OCCUPATIONS group by 1 order by 2,1) B
)
Select * from ABC
union all
Select * from XYZ
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 →
Why as to this is wrong? and how can I correct it?
With ABC as ( Select Concat(Name,"(",Substr(occupation,1,1),")") from (Select Name, occupation from OCCUPATIONS order by 1) A ), XYZ as ( Select Concat("There are a total of ",cnt , " ",occupation ) from (Select occupation,count(occupation) as cnt from OCCUPATIONS group by 1 order by 2,1) B ) Select * from ABC union all Select * from XYZ