#124 Posts by Users with Many Followers
Select all posts published by users who have more than 500 followers:
CREATE TABLE profile
(
id BIGSERIAL PRIMARY KEY,
nickname VARCHAR,
registered_at TIMESTAMP
);
CREATE TABLE post
(
id BIGSERIAL PRIMARY KEY,
owner_id BIGINT REFERENCES profile (id),
body TEXT,
inserted_at TIMESTAMP,
likes_count INT -- number of likes
);
CREATE TABLE subscription_count
(
profile_id BIGINT REFERENCES profile (id) UNIQUE,
followers_count INT, -- number of followers
following_count INT -- number of followed profiles
);
Question review
Sign in to start the dialogue
The mentor keeps the context of the current question and your previous messages.
Sign in
Available with Premium
This is just one of the solutions available with Premium. And more:
- 250+ advanced lectures
- 1300+ practice exercises
- 500+ solutions to problems from real interviews
- Personalized Java Hub certificates
- Expanded access to the AI mentor