728x90
group-by-having-count
-
캐글 intro_to_sql/03-group-by-having-count<Kaggle-Course> 2023. 3. 15. 15:37
prolific_commenters_query = """SELECT author, COUNT(id) AS NumPosts FROM `bigquery-public-data.hacker_news.comments` GROUP BY author HAVING COUNT(id) > 10000""" deleted_posts_query = """SELECT COUNT(1) AS num_deleted_posts FROM `bigquery-public-data.hacker_news.comments` WHERE deleted = True """