Skip to content

Commit 74ea0f1

Browse files
committed
Added some useful queries
1 parent 7f648ec commit 74ea0f1

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
select
2+
CAST(timestamp as date) as roundedDate,
3+
submissionIds,
4+
left (submissionSearch,
5+
10) + '...' as truncatedSubmissionSearch,
6+
emailAddress
7+
from
8+
DownloadLog d
9+
join Users u on u.id = d.userId
10+
where
11+
name != 'Zach Smith'
12+
order by
13+
timestamp desc;
14+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
select
2+
CAST(timestamp as date) as roundedDate,
3+
name,
4+
emailAddress,
5+
COUNT(*) as loginCount
6+
from
7+
logins l
8+
join users u on u.id = l.userId
9+
group by
10+
CAST(timestamp as date),
11+
name,
12+
emailAddress
13+
order by
14+
roundedDate desc,
15+
name;
16+

0 commit comments

Comments
 (0)