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 are using the wrong condition. You have to test, when the rest is 0? With 3 and with 5. Additionally you have to use OR instead AND because you want both group of numbers.

If you use AND you are going to get only the numbers that are multiple of both, multiple of 3 and multiple of 5.

Try:

```
total = 0

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

```
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!