Top "Unnest" questions

unnest is a function from the tidyr package that can expand the list columns.

Using UNNEST with a JOIN

I want to be able to use unnest() function in PostgreSQL in a complicated SQL query that has many JOINs. …

sql postgresql join naming-conventions unnest
PostgreSQL multidimensional arrays

I'm trying to pass data around as a multidimensional array, and I'm getting behavior that seems odd to me. Specifically …

arrays postgresql multidimensional-array unnest
SQL multiple UNNEST in single select list

I was implementing a Query system. I implemented unnest function. Now user was asking about using multiple unnest in a …

sql postgresql unnest set-returning-functions
UNNEST expression references column which is neither grouped nor aggregated

Google Analytics BigQuery tables are structured like this (Legacy SQL notations - only relevant fields are shown): visitId: INTEGER hits: …

sql google-analytics google-bigquery unnest
Postgres JOIN with unnest

Assume I have following tables: table: followers_arrays id | array --------+--------- 1 | {3,4,5} table: small_profiles id | username | pic --------+----------+…

database postgresql join relation unnest
Find rows where text array contains value similar to input

I'm trying to get rows where a column of type text[] contains a value similar to some user input. What …

arrays postgresql sql-like any unnest
Unnesting in SQL (Athena): How to convert array of structs into an array of values plucked from the structs?

I am taking samples from a Bayesian statistical model, serializing them with Avro, uploading them to S3, and querying them …

sql row avro amazon-athena unnest
Getting Values From Json Data Inside Array in Mysql

We are saving information in a json Column which contain json data in an array. Data structure: [ { "type":"automated_backfill", "…

mysql sql arrays json unnest
Bigquery SQL - Is it better to unnest in SELECT or JOIN?

I have a dataset where views are nested inside of sessions and I want a count of views for each …

sql google-bigquery unnest
Postgres - find min of array

Suppose I have a table like this: link_ids | length ------------+----------- {1,4} | {1,2} {2,5} | {0,1} How can I find the min length for …

sql arrays postgresql min unnest