79 of 100 menu

SQL Taskbook Level 8.9 of the SQL task book

The tables are given:

authors
id first_name last_name
1 Jack Brown
2 John Doe
3 Max White
tags
id name
1 IT
1 PHP
2 JavaScript
3 React
4 Angular
5 Vue.js
6 C/C++
7 Rust
posts
id title likes author_id
1 Lorem ipsum 1208 2
2 Lorem ipsum dolor sit amet 1503 2
3 Lorem ipsum dolor sit 2019 1
4 Lorem ipsum dolor 1099 3
post_tag
id post_id tag_id
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 2 7
7 2 6
8 2 5
9 2 4
10 2 3
11 3 2
12 3 7
13 3 5
14 3 6
15 4 5
16 4 1

Solve the following tasks for them:

Find the tag that is most common among posts with the least number of likes. Display the tag name, the average number of likes on posts with this tag, and the total number of such posts.

Find the author who has written the maximum number of posts, each of which has at least two different tags. Output the author's name, the number of such posts, and a list of these posts.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline