Question: I have a usage table with user\_id and login time. I want to get the number of users who logged in at least once a day. I also need to get the number of users who logged in at least once a week.

Any idea how can I go about it with a redshift query?

Here is the schema:

**user\_id: BigInt  

event\_time: Datetime**

Example results:

**No. of users who logged in at least once every day: 20
No. of users who logged in at least once week: 5**

Answer: 
The easiest way to make your about window modal is afaik adding the follwing lines to your `about_window()` function:

```
top2.focus_set()                                                        
top2.grab_set()    

```

the first line sets the focus to your about window,

the second line prohibits any other window to accept events.
state(newstate=None)

```
Returns the window's current state, one of:

    'normal': Displayed normally.

    'iconic': Iconified with the .iconify() method.

    'withdrawn': Hidden; see the .withdraw() method below.

```