Abschnitt 1. Kapitel 33
single
Challenge: Find Users by City
Swipe um das Menü anzuzeigen
Aufgabe
Swipe to start coding
Write a query to find users whose address city in the profile_data JSONB column is 'New York' using PostgreSQL JSON operators.
- Query the
user_profilestable. - Use PostgreSQL JSON operators (
->and->>) to access the nestedcityfield inside theaddressobject in theprofile_datacolumn. - Filter for rows where the
address.cityvalue is'Springfield'. - Return the
user_idandprofile_datacolumns for all matching users.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 33
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen