Challenge: Find Users by City
Tarea
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 6. Capítulo 3
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 2.86
Challenge: Find Users by City
Desliza para mostrar el menú
Tarea
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 6. Capítulo 3
single