BEGIN; BEGIN create or replace view revenue25 (supplier_no, total_revenue) as select l_suppkey, sum(l_extendedprice * (1 - l_discount)) from lineitem where l_shipdate >= '1996-07-01' and l_shipdate < date'1996-07-01' + interval '90 days' group by l_suppkey; CREATE VIEW select s_suppkey, s_name, s_address, s_phone, total_revenue from supplier, revenue25 where s_suppkey = supplier_no and total_revenue = ( select max(total_revenue) from revenue25 ) order by s_suppkey; s_suppkey | s_name | s_address | s_phone | total_revenue -----------+---------------------------+-------------------------------+-----------------+------------------ 60981 | Supplier#000060981 | y5iNhC1CGGNWkl9kntH, 4ljPYMw2 | 18-974-494-8628 | 2188520.24296159 (1 row) drop view revenue25; DROP VIEW COMMIT; COMMIT