Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
1 AS view_homepage,
min(time) AS view_homepage_time
FROM event
data->>'type' = 'view_homepage'
GROUP BY user_id

This comment has been minimized.

Copy link

@daemonfire300 daemonfire300 commented Dec 2, 2014

 data->>'type' = 'view_homepage'

I've never seen this sytnax in Postgresql what does it mean, and where is it in the official docs?


This comment has been minimized.

Copy link

@renzok renzok commented Dec 3, 2014

data is of type json and ->> is an operator which gets a JSON object field as text. Here the object field has name 'type' and its values (casted to text) get compared to 'view_homepage'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.