技術 【mysql】find_in_set句を利用して、複数値を指定検索する PR 2018-07-11 2021-11-13 1つのテーブルの中から、複数の商品IDや顧客ID等を取得したい。といった場合等に使います。 ### 複数のuseridを明示的に指定 ### 複数のuseridを明示的に指定 SET @userids='11111, 22222, 333333'; ### where句の中にあるuseridという項目の値が、@userids内の指定値にあうものを抽出する SELECT * FROM test_tbl WHERE find_in_set(userid, @userids); この記事が気に入ったら『目黒で働く分析担当の作業メモ』にご支援をお願いします! ※OFUSEに飛びます
技術 [python]matplotlibで「Font family 'meiryo' not found」が出た時の対策 ## matplotlibの環境確認 import matplotlib print(matplotlib.rcParams) #現在使用し...
技術 [bigquery]selectした項目名を日本語にする方法 SELECT product_id AS `商品ID`, product_name AS `商品名称`, price AS `価格`, qu...
技術 [python]query関数で「ValueError: unknown type object」などが出た時の対処コード # object型に変換 df = df.astype(object) # int型に変換 df = df.astype(int) # fl...
技術 [bigquery]string型の曜日情報を連番に並び替えるコード SELECT id, week, SUM(quantity) AS quantity, SUM(price) AS price FROM d...