in Databases edited by
270 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???

in Databases edited by
270 views

2 Comments

without GROUP BY clause, how you use attribute with Aggregate function ?
0
0
i edited my answer.is it correct??
0
0

Please log in or register to answer this question.

Related questions