Re: Subquery in select statement

2015-09-08 Thread Daniel Lopes
Sorry, but there are something that I can do in this case? *Daniel Lopes, B.Eng* Data Scientist - BankFacil CREA/SP 5069410560 Mob +55 (18) 99764-2733 Ph +55 (11) 3522-8009

Subquery in select statement

2015-09-03 Thread Daniel Lopes
Hi, There are somthing that I can do this? SELECT tb.id, (SELECT tb3.field FROM database.table2 tb2 JOIN database.table3 tb3 ON ( tb3.id = tb2.table3_id) ORDER BY tb3.date DESC LIMIT 1) AS tb3_field FROM database.table1 tb1 Best, *Daniel Lopes, B.Eng* Data Scientist - BankFacil CREA/SP