Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のようなデータベーステーブルがあります。
日付に応じてテーブルと区別したいhostel_name.日付が同じ場合は異なる名前のみがフェッチされますが、日付が変わると同じhostel_nameもフェッチされます.上の画像のように. 前もって感謝します。
hostel_name
and のusegroup by節hostel_namedate
group by
date
SELECT id,date,type,hostel_name,block_id,hostel_charge from <table_name> group by hostel_name,date