Aan de slagGa gratis aan de slag

JSONified

Semi-structured data can be challenging to query, so let's practice interacting with Yelpto's data once again.

Here, you will filter the contents of a VARIANT column.

Deze oefening maakt deel uit van de cursus

Introduction to Snowflake SQL

Cursus bekijken

Oefeninstructies

  • Filter where the DogsAllowed key in the attributes column is 'True' (note this is a string, not boolean).
  • Filter where the BusinessAcceptsCreditCards key in the attributes column is 'True' (note this is a string, not boolean).

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

SELECT business_id, name
FROM yelp_business_data
WHERE categories ILIKE '%Restaurant%'
	-- Filter where DogsAllowed is '%True%'
	AND ___ ___ '%True%'
    -- Filter where BusinessAcceptsCreditCards is '%True%'
    AND ___
    AND city ILIKE '%Philadelphia%'
    AND stars = 5
Code bewerken en uitvoeren