Last active
July 12, 2023 19:06
-
-
Save nfarah86/3bd82d9acd7979ff3681ee79e7b69f32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spark.sql("select marketplace, product_id, count(*), | |
avg(star_rating) from <TABLE> where product_category = 'Books' | |
group by 1,2 having avg(star_rating) >= 4 order by 3 desc,4 desc").show(20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment