みなさんおかえりなさい
MYSQL では不可能だと思うことをしようとしています。
作成した製品の生産レポートを引き出す非常に大きなデータベースがあります。現時点では、複数のクエリを実行してこれらの結果を取得し、データをテーブルに手動で転送してから、レポートが必要な人にデータを送信しています。
これを行う簡単な方法はありますか。つまり、単一のクエリです。
私が実行するクエリの例
a. SELECT count(id) from ProductA_T where created between '<date>' and '<date>' and productstatus = "<successful>";
b. SELECT count(id) from ProductB_T where created between '<date>' and '<date>' and productstatus = "<successful>";
c. SELECT count(id) from ProductC_T where created between '<date>' and '<date>' and productstatus = "<successful>";
探している結果の例
- 製品A 製品B 製品C
- 500 500 500