90 likes | 237 Vues
VW i SQL. VW i SQL. 1: select navn from lev where lby = 'berlin' 2: select model from bil where fabrik='wolfsburg'. VW i SQL. 3: select distinct lnr from bil,lvb where bil.bnr=lvb.bnr and model='jetta’ 4: select distinct model from bil,lvb where bil.bnr=lvb.bnr and lnr='l1'.
E N D
VW i SQL NOEA/IT - Databaser/VWiSOL
VW i SQL 1: select navn from lev where lby = 'berlin' 2: select model from bil where fabrik='wolfsburg' NOEA/IT - Databaser/VWiSOL
VW i SQL 3: select distinct lnr from bil,lvb where bil.bnr=lvb.bnr and model='jetta’ 4: select distinct model from bil,lvb where bil.bnr=lvb.bnr and lnr='l1' NOEA/IT - Databaser/VWiSOL
VW i SQL 5: select navn from lev where exists (select * from bil,lvb where bil.bnr=lvb.bnr and lvb.lnr=lev.lnr and model='golf’ and exists (select * from bil,lvb where bil.bnr=lvb.bnr and lvb.lnr=lev.lnr and model='passat')) NOEA/IT - Databaser/VWiSOL
Alternativt – 5b (select navn from lev,lvb,bil where lev.lnr=lvb.lnr and lvb.bnr=bil.bnr and model='passat') intersect (select navn from lev,lvb,bil where lev.lnr=lvb.lnr and lvb.bnr=bil.bnr and model='golf') NOEA/IT - Databaser/VWiSOL
VW i SQL 6: select distinct navn from lev, lvb, vare where betegn = 'møtrik' and lev.lnr=lvb.lnr and lvb.vnr=vare.vnr NOEA/IT - Databaser/VWiSOL
VW i SQL 7: select distinct navn from lev, lvb, bil where fabrik = 'wolfsburg' and lev.lnr=lvb.lnr and lvb.bnr=bil.bnr NOEA/IT - Databaser/VWiSOL
VW i SQL 8: select distinct model from lev, lvb, bil where navn = 'dohrman' and lev.lnr=lvb.lnr and lvb.bnr=bil.bnr NOEA/IT - Databaser/VWiSOL
VW i SQL 9: select distinct vare.vnr,betegn,vaegt from bil,lev,vare,lvb where bil.bnr=lvb.bnr and lev.lnr=lvb.lnr and vare.vnr=lvb.vnr and lby<>fabrik and vaegt>10 NOEA/IT - Databaser/VWiSOL