Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Find Users by City | JSON Functions
Functions in SQL

bookChallenge: 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_profiles table.
  • Use PostgreSQL JSON operators (-> and ->>) to access the nested city field inside the address object in the profile_data column.
  • Filter for rows where the address.city value is 'Springfield'.
  • Return the user_id and profile_data columns for all matching users.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 6. Capítulo 3
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

bookChallenge: 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_profiles table.
  • Use PostgreSQL JSON operators (-> and ->>) to access the nested city field inside the address object in the profile_data column.
  • Filter for rows where the address.city value is 'Springfield'.
  • Return the user_id and profile_data columns for all matching users.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 6. Capítulo 3
single

single

some-alt