Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM logs GROUP BY (order_id, log_name) ORDER BY order_id DESC LIMIT 0,1;
- select distinct subtbl.Name from (select first_name + last_name as "Name" from log) as subtbl;
- select subtbl.Name from (select first_name + last_name as "Name" from log) as subtbnl group by subtbl.Name limit 0, 1; -- this will take the first value
- select * from log order by id desc limit 0, 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement