Challenge: Querying Session Data
Opgave
Swipe to start coding
Write two SQL queries to find the total number of sessions for each user, and also identify users who have more than three sessions.
- Aggregate the
sessionstable byuser_id. - Count the number of sessions for each user.
- Return the user ID and the total session count for each user.
- Identify and return only those users who have more than three sessions.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 2
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 4.17
Challenge: Querying Session Data
Stryg for at vise menuen
Opgave
Swipe to start coding
Write two SQL queries to find the total number of sessions for each user, and also identify users who have more than three sessions.
- Aggregate the
sessionstable byuser_id. - Count the number of sessions for each user.
- Return the user ID and the total session count for each user.
- Identify and return only those users who have more than three sessions.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 2
single