よく考えたら前回の記事では最新状況の一覧は出せたが、検索はできていなかった。
(前回)
FLOW: start -- aaa--bbb--ccc--end
select * from ( select * from log where status = "aaa" OR status = "bbb" OR status = "ccc" order by date desc) as t group by product order by date desc
//all id's recent log
ここからさらに塗装中の個別IDを拾いたいときは、こんな感じ
select * from (select * from ( select * from log order by date desc) as t group by product order by date desc) as t2 where status ="aaa"
//search where recent status is "aaa"
0 件のコメント:
コメントを投稿