0

learning sql server

trying to write a query to find the top performing post (i.e. maximum engagement) of each social media platform (Facebook, Insta, Twitter, YouTube)... need to return the post, platform, engagement and reach !

This is what I tried:

select Posts, Reach, Impressions, Engagement, [Platform]
from Tablename
where 
 ENGAGEMENT in (select max(ENGAGEMENT) from Tablename)

but it is returing the highest performing post overall, whereas, I need highest performing post per platform

ashish g
  • 1
  • 1

0 Answers0