17.10 - AntiSelectの例: 列範囲なし - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine分析関数

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
2021年7月
Content Type
プログラミング リファレンス
Publication ID
B035-1206-171K-JPN
Language
日本語 (日本)

入力

入力テーブルantiselect_testは、13の列を含む売上データのサンプル セットです。

antiselect_test
sno id orderdate 優先順位 qty sales disct dmode custname province region custsegment prodcat
1 3 2010-10-13 00:00:00 低い 6 261.54 0.04 Regular Air Muhammed MacIntyre Nunavut Nunavut Small Business Office Supplies
49 293 2012-10-01 00:00:00 高い 49 10123 0.07 Delivery Truck Barry French Nunavut Nunavut Consumer Office Supplies
50 293 2012-10-01 00:00:00 高い 27 244.57 0.01 Regular Air Barry French Nunavut Nunavut Consumer Office Supplies
80 483 2011-07-10 00:00:00 高い 30 4965.76 0.08 Regular Air Clay Rozendal Nunavut Nunavut Corporate Technology
85 515 2010-08-28 00:00:00 指定しない場合 19 394.27 0.08 Regular Air Carlos Soltero Nunavut Nunavut Consumer Office Supplies
86 515 2010-08-28 00:00:00 指定しない場合 21 146.69 0.05 Regular Air Carlos Soltero Nunavut Nunavut Consumer Furniture
97 613 2011-06-17 00:00:00 高い 12 93.54 0.03 Regular Air Carl Jackson Nunavut Nunavut Corporate Office Supplies

SQL呼び出し

SELECT * FROM Antiselect (
  ON antiselect_test
  USING
  Exclude ('id', 'orderdate', 'disct', 'province', 'custsegment')
) AS dt ORDER BY 1, 4;

出力

sno 優先順位 qty sales dmode custname region prodcat
1 低い 6 2.61540000000000E 002 Regular Air Muhammed MacIntyre Nunavut Office Supplies
49 高い 49 1.01230000000000E 004 Delivery Truck Barry French Nunavut Office Supplies
50 高い 27 2.44570000000000E 002 Regular Air Barry French Nunavut Office Supplies
80 高い 30 4.96576000000000E 003 Regular Air Clay Rozendal Nunavut Technology
85 指定しない場合 19 3.94270000000000E 002 Regular Air Carlos Soltero Nunavut Office Supplies
86 指定しない場合 21 1.46690000000000E 002 Regular Air Carlos Soltero Nunavut Furniture
97 高い 12 9.35400000000000E 001 Regular Air Carl Jackson Nunavut Office Supplies