edited by
283 views
0 votes
0 votes

consider the relation 

person(driver_id,name,address)

car(license,model,year)

accident(report_number,date,location)

own(driver_id,license)

participated(report_number,license,driver_id,damage_amount)

query=find the total number of people who owned the car that were involved in accident in 2009.

my answer is 

select count(driver_id),report number

from (car natural join own)natural join(accident natural join participated)

where date=2009.

group by report number

am i right???

edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
kd..... asked Apr 30, 2019
679 views
Here why does the 5th query select * from employees natural join works_on where PID = 'X' AND PID='Y'; is not workingThe queries are The output are
0 votes
0 votes
2 answers
2
Mk Utkarsh asked Dec 2, 2018
1,008 views
Select Rating From professor P2 Where 5>=(Select count (*) From professor P3 Where P2.Rating <= P3.Rating);Can someone please explain the query?
0 votes
0 votes
1 answer
3
Shamim Ahmed asked Nov 12, 2018
409 views
In this question:-https://gateoverflow.in/8225/gate2015-1-27I am not understanding how the query is returning 2 .I think DISTINCT must be there to give the correct answer...