1 select o_orderpriority from orders where o_orderdate >= date '1993-07-01' and exists(select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate),exists嵌套语句的查询语句中lineitem表中不包含o_orderkey字段.
2 select * from ORDERS where o_orderdate >= date '1993-07-01'
3 select * from ORDERS where o_orderdate < date '1993-07-01' + interval '3' month(day/year/hour/minute)
4 select extract(year from l_shipdate) as l_year from lineitem
5 select l_shipdate from lineitem where l_shipdate between date '1995-01-01' and date '1996-12-31'
6 select sum(case when n_name = 'RUSSIA' then 12 else 0 end) / sum(N_REGIONKEY) as mkt_share from nation
7 select p_name from part where p_name like '%blanched%'
8 select substring(c_phone from 1 for 2) as cntrycode from customer // 电话号码的尾号
9 select COALESCE(cr_return_quantity,0) AS sales_cnt from CATALOG_RETURNS
10 select * from CALL_CENTER where CAST(CC_GMT_OFFSET AS DECIMAL(17,2))/CAST(CC_TAX_PERCENTAGE AS DECIMAL(17,2)) < 0.9
11 select cast('1999-08-25' as date) + 30 from dual
12 with inv as (select * from ) CALL_CENTER
13 select substr(ca_zip,1,5) as subcazip, substr(s_zip,1,5) as subszip from CUSTOMER_ADDRESS,STORE where substr(ca_zip,1,5) = substr(s_zip,1,5)
14 select round(SS_NET_PAID_INC_TAX/(coalesce(SS_QUANTITY,1)),2) ratio from STORE_SALES
15