Back to home page

OSCL-LXR

 
 

    


0001 select d_year, c_nation, sum(lo_revenue-lo_supplycost) as profit1
0002         from date, customer, supplier, part, lineorder
0003         where lo_custkey = c_custkey
0004                 and lo_suppkey = s_suppkey
0005                 and lo_partkey = p_partkey
0006                 and lo_orderdate = d_datekey
0007                 and c_region = 'AMERICA'
0008                 and s_region = 'AMERICA'
0009                 and (p_mfgr = 'MFGR#1' or p_mfgr = 'MFGR#2')
0010         group by d_year, c_nation
0011         order by d_year, c_nation