14 events
when toggle format what by license comment
Jan 24 '17 at 5:13 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Dec 21 '16 at 8:10 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Nov 16 '16 at 7:06 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Oct 13 '16 at 23:10 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Jul 24 '15 at 13:07 history edited Samuel De Rycke CC BY-SA 3.0
added 103 characters in body; edited tags
Jul 24 '15 at 9:50 answer San timeline score: 2
Jul 24 '15 at 9:44 comment added San Userid is lookup field ?
Jul 23 '15 at 20:46 comment added Aayush K May be I am not understanding your requirement correctly, but do you even need to use the count_distinct? if you execute the following query, you will get one record for each unique user that logged in today. Select userid from LoginHistory where logintime = today group by userid.
Jul 23 '15 at 18:53 comment added ChrisBland Thanks but in super large orgs you'll blow out the record collection size, my user has 40+ login history objects for today only, so across multiple thousand people you can't query them all back so you must use the aggregate results
Jul 23 '15 at 18:11 comment added Aayush K I do not have an answer for the query but one way of getting what you want is to query the LoginHistory table and add the returned userId values to a Set which will remove duplicates.
Jul 23 '15 at 17:40 comment added ChrisBland Final comment: the reason I can't do a COUNT is each time you login you get a new LoginHistory record, we just are trying to identify if they did login during that time window
Jul 23 '15 at 17:38 comment added ChrisBland If you run: "SELECT userid,COUNT_DISTINCT(userid) agg FROM loginhistory WHERE logintime = TODAY GROUP BY UserId" you get MALFORMED_QUERY: SELECT userid,COUNT_DISTINCT(userid) agg FROM loginhistory WHERE ^ ERROR at Row:1:Column:30 Grouped field should not be aggregated: UserId
Jul 23 '15 at 17:38 comment added ChrisBland IF you run: SELECT userid,COUNT_DISTINCT(userid) agg FROM loginhistory WHERE logintime = TODAY you get "MALFORMED_QUERY: Field must be grouped or aggregated: UserId"
Jul 23 '15 at 17:25 history asked ChrisBland CC BY-SA 3.0