Group by fk in two tables
I would like to implement a query that returns the following result. Could anyone help with this?
Table: tickets
*Id | customer
1 | 1
2 | 1
3 | 2
4 | 3
Table: ticket_messages
id | *ticket_id | message
1 | 1 | message
2 | 1 | message
3. | 2 | message
Result
customer. | number_of_tickets | number_of_ticket_messages
1 | 2 | 2
2 | 1 | 1
3 | 1 | 0
Subject
Written By
Posted
Group by fk in two tables
November 16, 2023 03:12AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.