Kayleigh
Member
- Local time
- Today, 00:40
- Joined
- Sep 24, 2020
- Messages
- 709
Hi,
I'm using a SQL query tool (not Access) on a database but not sure exactly how to write my SQL to get the desired results.
The table I'm querying is Events and it contains some of the following fields:
However it will show ALL events in this time period whilst I only want several results for each user (if possible first and last time signed in each day they were in otherwise just the days they were in).
Can anyone suggest how I can implement this into the query above?
I'm using a SQL query tool (not Access) on a database but not sure exactly how to write my SQL to get the desired results.
The table I'm querying is Events and it contains some of the following fields:
- EventID
- EventTime
- EventTypeID
- EventDetails
- UserID
- CardNumber
SQL:
select * from sdk.Events
where eventTime > (select dateadd(week, -1, getdate()));
Can anyone suggest how I can implement this into the query above?