var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Converting a subquery into a join query
I have a subquery which does not work in the mysql version that my client has installed.
SELECT user_name from users
where user_id in
order by post_created_on
desc limit 0,10)
How to convert this into a query with join?
I tried the below syntax and it doesnt work.
select user_name from users, posts where users.user_id=posts.poster_id
group by posts.poster_id order by post_created_on
desc limit 0,10
No problem. I tried this and it seems to work.
max( unix_timestamp( poll_created_on ) ) AS mx
INNER JOIN posts ON users.user_id = posts.poster_id
GROUP BY user_name
ORDER BY mx DESC