Базы данных Oracle - статьи


              

Запрос типа "звезда" номер 2


SELECT C.district, C.name, T.year, T.month, R.region_number, SUM(sales) FROM customers C, time T weekly_sales S, sales_region R WHERE S.region_id=R.region_id AND S.addr_id=C.addr_id AND S.date=T.date AND T.year in (1998, 1999) AND T.month in (1,2,3,4,5) AND C_district = 'Chicago' AND R.region_number in ('234','4565','111','1') GROUP BY C.district, C.name, T.year, T.month, R.region_number;


Содержание  Назад  Вперед