I have two tables, table one
+----------+------------+------+-----+---------+----------------+
| Field    | Type       | Null | Key | Default | Extra          |
+----------+------------+------+-----+---------+----------------+
| id       | int(11)    | NO   | PRI | NULL    | auto_increment |
| pixel    | text       | NO   |     | NULL    |                |
| metadata | text       | NO   |     | NULL    |                |
| data     | text       | NO   |     | NULL    |                |
| attended | int(11)    | NO   |     | NULL    |                |
| alerted  | int(11)    | NO   |     | NULL    |                |
| date     | bigint(20) | NO   |     | NULL    |                |
+----------+------------+------+-----+---------+----------------+
Table two
+------------------+------------+------+-----+---------+----------------+
| Field            | Type       | Null | Key | Default | Extra          |
+------------------+------------+------+-----+---------+----------------+
| id               | int(11)    | NO   | PRI | NULL    | auto_increment |
| lead_id          | int(11)    | NO   |     | NULL    |                |
| project_id       | int(11)    | NO   |     | NULL    |                |
| user_id          | int(11)    | NO   |     | NULL    |                |
| type             | int(11)    | NO   |     | NULL    |                |
| status           | int(11)    | NO   |     | NULL    |                |
| text             | text       | NO   |     | NULL    |                |
| comm             | int(11)    | NO   |     | NULL    |                |
| sum              | text       | NO   |     | NULL    |                |
| meeting_date     | text       | NO   |     | NULL    |                |
| meeting_location | text       | NO   |     | NULL    |                |
| date             | bigint(20) | NO   |     | NULL    |                |
+------------------+------------+------+-----+---------+----------------+
I want to join table one to two on 1.id = 2.lead_id where 2.date is max and then select it if 2.status equals x
I tried, about everything (accept the answer :D ), nothing got it. Thank you. this question is different It has an AND cluse at the end
 
     
    