Hi. I want to get total number of users (for past month) and total_number of posts (for 2 months ago).
How can I use one Mysql query to grap above information?
@danimohamadnejad it might be possible, but it would be harder to understand/debug. And even if it was faster, it wouldnt be by alot (it might even be slower)
@danimohamadnejad that query isn't limited to 2 months. I also assumed you wanted to write it in laravel, not directly in mysql? And be sure to test if it is actually faster than just doing 2 queries, and that the results are the same