AnaHid
AnaHid

Reputation: 37

get all the values of a specific field of a datastore for each users using bigquery

I need to get all the log in times of each users from our data store. fields of the data store are

users, logInTime, LogOutTime, ...

I know I can use count(logInTime) and group it by users to see how many times a user logged in to our system, but how can I get all the logged in times in a list? Thank you guys!

Upvotes: 1

Views: 49

Answers (1)

NathanC
NathanC

Reputation: 193

you can use the group_concat function so something like this:

select 
userid, group_concat(logInTime,'|')
from table
group by userid

Upvotes: 1

Related Questions