I like the way he thinks 1. get the feilds you want to print out 2.see what are they showing without any filter 3.then filter the things and check the output again 4/now use the output to get the result although looks likes an obvious approach at first but if didn't applied and if directly faced the problem head on then it starts looking tough/complex but by his method it is easier to breakdown the problem , so more than sql he's teaching to breakdown the problem in chunks
Thanks , Before this tutorial i had no clue we can use subquery in "Select" statement like that also. Can you suggest any article which tell us more about this type of subquery usage in select Statement
just 2 line !!! great select contest_id,round(count(user_id) * 100.0/(select count(user_id) from users),2) as percentage from register group by contest_id order by percentage desc,contest_id when i try this, Time Limit Exceeded
I like the way he thinks
1. get the feilds you want to print out
2.see what are they showing without any filter
3.then filter the things and check the output again
4/now use the output to get the result
although looks likes an obvious approach at first but if didn't applied and if directly faced the problem head on then it starts looking tough/complex but by his method it is easier to breakdown the problem , so more than sql he's teaching to breakdown the problem in chunks
exactly!
Thanks ,
Before this tutorial i had no clue we can use subquery in "Select" statement like that also.
Can you suggest any article which tell us more about this type of subquery usage in select Statement
just 2 line !!! great
select contest_id,round(count(user_id) * 100.0/(select count(user_id) from users),2) as percentage
from register
group by contest_id
order by percentage desc,contest_id
when i try this, Time Limit Exceeded
Why should we use subquery instead of 3😮