sql high hand please help.# Database - 数据库
w*n
1 楼
say i have three tables, motel, resorts, bed-breakfirst,
and all three tables have a column called price.
and i want to calculate avg, max, and min price
from all three tables. how do i do that?
i know select avg(price) from table-name
but it only gives me avg price from only one table,
how do i get all three tables' avg???
and all three tables have a column called price.
and i want to calculate avg, max, and min price
from all three tables. how do i do that?
i know select avg(price) from table-name
but it only gives me avg price from only one table,
how do i get all three tables' avg???