poco/Data/SQLParser/test/queries/tpc-h-07.sql
Aleksandar Fabijanic ef688babc2
SQLParser not included in the release archive #4453 (#4456)
* 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>
2024-02-16 09:33:14 +01:00

11 lines
852 B
SQL

-- http://www.sqlserver-dba.com/2011/09/this-is-a-followup-on-my-earlier-post-of-sql-server-test-data-generation-testing-tools-i-had-some-requests-for-my-set-up-pr.html
SELECT SUPP_NATION, CUST_NATION, L_YEAR, SUM(VOLUME) AS REVENUE
FROM ( SELECT N1.N_NAME AS SUPP_NATION, N2.N_NAME AS CUST_NATION, datepart(yy, L_SHIPDATE) AS L_YEAR,
L_EXTENDEDPRICE*(1-L_DISCOUNT) AS VOLUME
FROM SUPPLIER, LINEITEM, ORDERS, CUSTOMER, NATION N1, NATION N2
WHERE S_SUPPKEY = L_SUPPKEY AND O_ORDERKEY = L_ORDERKEY AND C_CUSTKEY = O_CUSTKEY
AND S_NATIONKEY = N1.N_NATIONKEY AND C_NATIONKEY = N2.N_NATIONKEY AND ((N1.N_NAME = 'FRANCE' AND N2.N_NAME = 'GERMANY') OR
(N1.N_NAME = 'GERMANY' AND N2.N_NAME = 'FRANCE')) AND
L_SHIPDATE BETWEEN '1995-01-01' AND '1996-12-31' ) AS SHIPPING
GROUP BY SUPP_NATION, CUST_NATION, L_YEAR
ORDER BY SUPP_NATION, CUST_NATION, L_YEAR