Question: I have an Excel Table named Table5 which consist of two columns CompanyCode and EmployeeLevel. Now my question is i want to get the unique values of EmployeeLevel columns. Take note that the length of the record is unknown. I am using the Table5[EmployeeLevel] as the range to include all the records in the Table5. Is there a formula that you can provide ? I cannot use ActiveX object to loop through each record. I must do it via Excel formula. The solutions I got are only usable when it is fixed how long the records are. but this record I am working on is a dynamic table. 

Thanks in advance :)

Answer: 
Like @Grim said, you can use `INNER JOIN` instead of `LEFT JOIN`. However, if you truly look for optimization, I would suggest you to have an extra field at table `users` with a precalculate `point`. This solution would beat any query optimization with your current database design.
Ever thought about partitioning? 
I'm currently working with large database and successfully improve sql query.

For example,

```
PARTITION BY RANGE (`ID`) (
    PARTITION p1 VALUES LESS THAN (100) ENGINE = InnoDB,
    PARTITION p2 VALUES LESS THAN (200) ENGINE = InnoDB,
    PARTITION p3 VALUES LESS THAN (300) ENGINE = InnoDB,
    ... and so on..
)

```

It allows us to get better speed while scanning mysql table. Mysql will scan only partition p 1 that contains userid 1 to 99 even if there are million rows in table.

Check out this <http://dev.mysql.com/doc/refman/5.5/en/partitioning.html>