Professional Documents
Culture Documents
Rezolvari Oracle
Rezolvari Oracle
4.1. select cd_number as "Numar CD",title as"Titlu CD", producer as "Producator", year as "Anul aparitiei"
from D_CDs where mod(length(title),2)<>0 order by year desc
4.2. select title,producer from d_cds where year in (select min(year) from d_cds)
4.3. select title,artist from d_songs where id in (select song_id from d_track_listings where track=1)
4.4. select c.title, s.title, s.artist from d_cds c join d_track_listings t on (c.cd_number=t.cd_number)
join d_songs s on (t.song_id=s.id) where c.year =2000
6.1. select last_name||' '||first_name as "Nume si Prenume",phone as "Numar telefon", email as "Adresa de
email" from d_clients where email like '%yahoo%'
6.2. select first_name,last_name from d_partners
where id=(select id from d_partners where partner_type='Manager')
6.3. select name,event_date from d_events
where client_number=(select client_number from d_clients where first_name='Lauren')
6.4. select s.title,s.artist,t.description from d_songs s join d_types t on (s.type_code=t.code)
where s.title like 'I%'
7.1. select round(avg(salary)) as “Salariu mediu” from f_staffs where manager_id is not null
7.2. select code,name from f_promotional_menus
where end_date-start_date=(select min(end_date-start_date) from f_promotional_menus)
7.3. select quantity from f_order_lines
where food_item_number in (select food_item_number from f_food_items where regular_code is not null)
7.4. select c.first_name,c.last_name,o.order_date,o.order_total
from f_customers c left outer join f_orders o on(c.id=o.cust_id)
9.1. select street_address as "Adresa",postal_code as "Cod postal",city as "Nume oras" from locations
where country_id='US' and city like '%e'
9.2. select count(*) as "numar locatii" from locations
where country_id not in (select country_id from locations where city='Seattle')
9.3. select country_id,country_name from countries
where region_id in(select region_id from regions where region_name='Europe')
9.4. select department_name,street_address from departments join locations using(location_id)
2
19.1. select artist,title from d_songs where artist like '%o%'
19.2. select title from d_songs where type_code in (12,77) order by title
19.3. select artist,title,duration,description from d_songs,d_types where type_code=code