I have two tables
Technology
+--------+--------+
| tid(P) | name |
+--------+--------+
| 1 | Java |
|--------|--------|
| 2 | PHP |
+--------+--------+
Employee
+----------+----------+------------+
| eid(P) | tid(F) ^| join_date |
+----------+----------+------------+
| 1 | 1 | 2013-10-01 |
|----------|----------|------------|
| 2 | 1 | 2013-10-10 |
|----------|----------|------------|
| 3 | 1 | 2013-10-12 |
|----------|----------|------------|
| 4 | 1 | 2013-09-10 |
|----------|----------|------------|
| 5 | 1 | 2013-11-10 |
|----------|----------|------------|
| 6 | 1 | 2013-12-10 |
|----------|----------|------------|
| 7 | 2 | 2013-08-01 |
|----------|----------|------------|
| 8 | 2 | 2013-10-28 |
|----------|----------|------------|
| 9 | 2 | 2013-05-12 |
|----------|----------|------------|
| 10 | 2 | 2013-10-10 |
|----------|----------|------------|
| 11 | 2 | 2013-11-10 |
|----------|----------|------------|
| 12 | 2 | 2013-12-05 |
|----------|----------|------------|
I need to get data of recently joined three employees for each technology. I tried different joins and also did google on this but didn't get any success.
Expected Result
+-------+--------+-------+------------+
| tid | name | eid | join_date |
+-------+--------+-------+------------+
| 1 | Java | 6 | 2013-12-10 |
+-------+--------+-------+------------+
| 1 | Java | 5 | 2013-11-10 |
+-------+--------+-------+------------+
| 1 | Java | 3 | 2013-10-12 |
+-------+--------+-------+------------+
| 2 | PHP | 12 | 2013-12-05 |
+-------+--------+-------+------------+
| 2 | PHP | 11 | 2013-11-10 |
+-------+--------+-------+------------+
| 2 | PHP | 8 | 2013-10-28 |
+-------+--------+-------+------------+
What should be my query?
Please guide.
Thanks,
Ankur