Presentation file of XPages 2013 Closing Session. It contains history of XPages, new feature introduction for 9.0.1 Social Edition and future of XPages. I used it at closing session of XPagesDay 2013.
XPagesDay 2013 のクロージングセッションの資料です。XPages の歴史、9.0.1 での新機能そして将来像を説明しています。
Presentation file of XPages 2013 Closing Session. It contains history of XPages, new feature introduction for 9.0.1 Social Edition and future of XPages. I used it at closing session of XPagesDay 2013.
XPagesDay 2013 のクロージングセッションの資料です。XPages の歴史、9.0.1 での新機能そして将来像を説明しています。
38. Viewを作成する
CREATE OR REPLACE VIEW v_customer_orders AS SELECT
customer_id,
MAX(order_date) last_order_date,
SUM(sub_total + tax) total_price
FROM t_orders
GROUP BY customer_id;
40. 顧客テーブルと作成したViewを結合して顧客
氏名 最終購入日 購入金額合計 を取得する
SELECT
c.first_name,
c.last_name,
IFNULL(co.last_order_date,'-'),
IFNULL(co.total_price,'-')
FROM t_customers c
LEFT JOIN v_customer_orders co ON
c.id = co.customer_id;
41. Viewに項目を追加する
CREATE OR REPLACE VIEW v_customer_orders AS SELECT
customer_id,
MAX(order_date) last_order_date,
MIN(order_date) first_order_date,
COUNT(customer_id) order_count,
SUM(sub_total + tax) total_price
FROM t_orders
GROUP BY customer_id;