My programing World
A collection of programs and interview questions
Sunday, June 5, 2016
SQL concatenation
select name ||'('|| upper(substr(occupation,1,1)) || ')'
from occupations
order by name;
select 'There are total ' || ct ,lower(occupation) ||'s.' from (
select occupation,count(*) as ct from occupations
group by occupation
order by ct,occupation
);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment