Question: What is the meaning/purpose of using over and rank keywords in hive sql?

```
select rank() over (order by net_worth desc) as rank, name, net_worth from wealth order by rank, name;
+------+---------+---------------+
| rank | name    | net_worth     |
+------+---------+---------------+
| 1    | Solomon | 2000000000.00 |
| 2    | Croesus | 1000000000.00 |
| 2    | Midas   | 1000000000.00 |
| 4    | Crassus | 500000000.00  |
| 5    | Scrooge | 80000000.00   |
+------+---------+---------------+

```

Answer: 
You're missing a `not` in your application of De Morgan's Law:

```
total = 0

for x in range(1000):
    if not (x % 5 != 0 and x % 3 != 0):
        total += x
print(total)

```

`not (x % 5 != 0 and x % 3 != 0)` is equivalent to `x % 5 == 0 or x % 3 == 0`, the latter of which is stated in the page you link as the equivalent `not x%5 or not x%3`.
A couple of things are wrong with the program. For starters, your `if` statement checks the wrong condition--it checks to see whether or not it is NOT divisible by 3 or 5. It should be `if x%3==0 or x%5==0:`

Second, you have an indentation error, so nothing is being executed by the `if` statement. Indent the `total+=x` statement. 

Your final code will look like this:

```
total = 0
for x in range(1000):
    if x % 5 == 0 or x % 3 == 0:
        total += x
print(total)

```

Best of luck, and happy coding!