BEGIN; BEGIN create or replace view revenue18 (supplier_no, total_revenue) as select l_suppkey, sum(l_extendedprice * (1 - l_discount)) from lineitem where l_shipdate >= '1993-02-01' and l_shipdate < date'1993-02-01' + interval '90 days' group by l_suppkey; CREATE VIEW select s_suppkey, s_name, s_address, s_phone, total_revenue from supplier, revenue18 where s_suppkey = supplier_no and total_revenue = ( select max(total_revenue) from revenue18 ) order by s_suppkey; s_suppkey | s_name | s_address | s_phone | total_revenue -----------+---------------------------+-----------------------+-----------------+------------------ 53896 | Supplier#000053896 | EyXCv VGbOFEvU1UhLBx5 | 29-870-102-7947 | 2230304.98018069 (1 row) drop view revenue18; DROP VIEW COMMIT; COMMIT