I'm using this query:
SELECT A.place_idx,A.place_id,B.TOTAL_CNT,(@r := @r + 1) AS rank FROM CUSTOM_LIST
AS A
INNER JOIN
(SELECT @r := 0)
AS C
INNER JOIN
(SELECT place_id,COUNT(place_id) AS TOTAL_CNT from COUNT_TABLE GROUP BY place_id)
AS B ON B.place_id=A.place_id order by B.TOTAL_CNT desc;
Which gives this result:
But I want this result:
How do I need to modify my query? What am I doing wrong?
Your Website Has Been Penalized By Google This can consist of anything from building lots of spammy backlinks to your website t, to using over optimized anchor text or thin/duplicate content. Receiving a penalty will result in a loss of organic traffic and rankings making your website hard to find in search results.
In the vast majority of cases, a website not ranking in Google means that you need to invest in search engine optimization (SEO) — AKA the science of showing up in search when it matters most.
SELECT *,(@r := @r + 1) AS rank FROM
(
SELECT A.place_idx,A.place_id,B.TOTAL_CNT FROM CUSTOM_LIST
AS A
INNER JOIN
(SELECT place_id,COUNT(place_id) AS TOTAL_CNT from COUNT_TABLE GROUP BY place_id)
AS B ON B.place_id=A.place_id order by B.TOTAL_CNT desc
) AS T, (SELECT @r := 0) AS tt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With