I have a table in which all action logs are stored. It contains "user\_id" (to mark user), "statement\_id" (to mark statement that has been worked on), "action\_date" (to mark action time) and "action\_type" (to mark what action was done). A user can work on many statements on which many actions can be performed.

I need to produce a query that will show what statements were worked on at a specific time (let's say from March 1, 2018 to March 30, 2018) - that I can do. The difficulty for me is to limit the outcome. I mean precisely how to limit the outcome from this:

```
Statements that were worked on: 30, 30, 30, 18, 18, 42, 42, 42

```

To this:

```
Statements that were worked on: 30, 18, 42

```

I tried to work with queries like this one but I'm no professional. I find it difficult to understand the concept of some limiting SQL commands.

```
SELECT * FROM action_log 
WHERE user_id = 1 
AND action_date >= 1519858800 
AND action_date <= 1522447200 
GROUP BY user_id 
HAVING user_id = 1 
ORDER BY id DESC

```

I would be very grateful for any help.