The following code is an example of an SQL submission that the server cannot use as
a star schema because no single central fact table can be identified.
proc sql;
create table Sales_Report as
select a.STORE_NUMBER,
b.quarter
c.month,
d.state,
e.SUPPLIER_ID
sum(a.total_sold) as tot_qtr_mth_sales
from Sales a,
Time b,
Products c,
Location d,
Supplier e
where a.sales_date = b.sales_date
and a.STORE_NUMBER = d.store_number
and a.PRODUCT_CODE = c.product_code
and c.SUPPLIER_ID = d.supplier_id
and b.quarter in (3, 4)
and c.PRODUCT_CODE in (23, 100)
group by b.quarter,
a.STORE_NUMBER,
b.month;
quit;
The server cannot use the SQL submission in this example as a star schema This code
joins the dimension tables for Time, Products, and Location to the Sales
table, but the table for Supplier is joined to the Sales table through the Products
table. As a result, the topology does not define a single central fact table.