select Document_id, Document_date, sum(document_money)
from documents
group by Docuemnt_id, Docuement_date;
最初のクエリは、次の結果を取得します。
1 01-FEB-2017 10000
2 02-FEB-2017 20000
3 03-FEB-2017 10000
クエリ #2:
select document_id, Document_date, document_money, document_details
from documents ;
結果:
1 01-FEB-2017 5000 rentment
1 01-FEB-2017 5000 food
2 02-FEB-2017 10000 car
2 02-FEB-2017 10000 house
3 03-FEB-2017 7000 mobiles
3 03-FEB-2017 3000 drinks
次のように、document_no、the_date、金額の合計、および詳細を提供するクエリを作成するにはどうすればよいですか。
1 01-FEB-2017 10000 rentment
1 01-FEB-2017 10000 food
2 02-FEB-2017 20000 car
2 02-FEB-2017 20000 house
3 03-FEB-2017 10000 mobiles
3 03-FEB-2017 10000 drinks