i have three table i attached db files with query result i am getting. my query is below
select tts.transaction_id,tts.service_type,tt.theme_name from transactions tts
inner join users tu on tu.user_id=tts.user_id
inner join themes tt
where tts.user_id = 71
and tts.service_type in ('purchased','startup_service')
group by tts.theme_transaction_id;
i am not getting write theme name user_id 71 purchase.
when user purchase services there is no theme_id available so it's 0 but if theme purchase then theme id will be there.
hope any one can expain write approch or query. thanks