mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-25 22:44:03 +02:00

* fix(SQLParser): move to Data dir; add extradirs, remove vs 140,150 build scripts generation * fix(ActiveRecord): Makefile #4453 * fix(Data): Make SQLParser internal * fix(build): ODBC Makefile and Data libs CmakeLists #4453 * fix(build): Data libs CMakeLists #4453 * fix(build): regenerate VS projects #4453 * fix(CppUnit): remove Foundation dependency * fix(SQLParser): remove leftover unnecessary includes * fix(SQLParser): remove fwd header #4453 * fix(PocoDoc): remove SQLParser from include list * fix(mkrelease): remove 140,150 vs projects * fix(SQLParser): Disable SQL parsing by default #4462 * fix(test): Disable SQL parsing by default #4462 * Fix detection of odbc and apache2 for Fedora (#4461) * Fixed transaction handling in MySQL test when SQL parser is switched off * chore(ParallelSocketAcceptor): remove unnecessary include and using from header --------- Co-authored-by: Matej Kenda <matejken@gmail.com> Co-authored-by: topazus <77263945+topazus@users.noreply.github.com> Co-authored-by: Friedrich Wilckens <frwilckens@gmail.com>
10 lines
589 B
SQL
10 lines
589 B
SQL
-- TPC_H Query 12 - Shipping Modes and Order Priority
|
|
SELECT L_SHIPMODE,
|
|
SUM(CASE WHEN O_ORDERPRIORITY = '1-URGENT' OR O_ORDERPRIORITY = '2-HIGH' THEN 1 ELSE 0 END) AS HIGH_LINE_COUNT,
|
|
SUM(CASE WHEN O_ORDERPRIORITY <> '1-URGENT' AND O_ORDERPRIORITY <> '2-HIGH' THEN 1 ELSE 0 END ) AS LOW_LINE_COUNT
|
|
FROM ORDERS, LINEITEM
|
|
WHERE O_ORDERKEY = L_ORDERKEY AND L_SHIPMODE IN ('MAIL','SHIP')
|
|
AND L_COMMITDATE < L_RECEIPTDATE AND L_SHIPDATE < L_COMMITDATE AND L_RECEIPTDATE >= '1994-01-01'
|
|
AND L_RECEIPTDATE < dateadd(mm, 1, cast('1995-09-01' as datetime))
|
|
GROUP BY L_SHIPMODE
|
|
ORDER BY L_SHIPMODE; |