Back to home page

OSCL-LXR

 
 

    


0001 select c_city, s_city, d_year, sum(lo_revenue) as revenue
0002         from customer, lineorder, supplier, date
0003         where lo_custkey = c_custkey
0004                 and lo_suppkey = s_suppkey
0005                 and lo_orderdate = d_datekey
0006                 and c_nation = 'UNITED STATES'
0007                 and s_nation = 'UNITED STATES'
0008                 and d_year >= 1992 and d_year <= 1997
0009         group by c_city, s_city, d_year
0010         order by d_year asc, revenue desc