I\'m a SQL newbie and I\'m trying to write the following query:
I have the following table:
user_id | chat_id ---------+---------
Wh