everyone. I have 2 tables
Lobby:
|lobby_id (pk, a_increment) | t_id | u_id |
-------------------------------------------
|1 | 6 | 131 |
Trips:
|tid | t_name | t_desc | max_size |
----------------------------------
|6 | GO TO HELL | DSADA | 13 |
|7 | GO TO das | DSADA | 9 |
|7 | GO TO das | DSADA | 9 |
I need to count u_id from lobby where t_id = 6 (tid in Trips table) and display: count and max_size from (trips) my sql query so simple:
SELECT count(b.u_id) as counter, a.size as p_size
from trips a
left join lobby b ON b.t_id=6
But the query result show me not counter = 1 and max_size = 13, this query returs counter 3 and max_size 13