RienSQL
TASK #20 · Medium

Spending on entertainment

Your brief
Determine which family members spent money on entertainment and how much each spent. Include only family members whose total entertainment expenses are greater than 0 in the result. Output the family status, name, and amount.
Expected columnsstatus member_name costsFamily
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
family_membersmember_id, status, member_name, birthday
goodsgood_id, good_name, type
good_typesgood_type_id, good_type_name
paymentspayment_id, family_member, good, amount, unit_price, date