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)

```
1. try this:

```
def sumOfMultiples(number):
    sum = 0
    for i in range(1,number):
        if i % 2 == 0 or i % 3 == 0:
            sum += i
    return sum

print (sumOfMultiples(15))

```