Hi guys , I need to cross two databases with a from clause:
So far Im using two differents queries , like:
From db1
select * from fsan_top_100 order by hits desc limit 5;
+--------------+------+
| fsan | hits |
+--------------+------+
| ZNTS035D41E3 | 172 |
| ZNTS0344E3BE | 164 |
| ZNTS037FB6ED | 156 |
| ZNTS037CD31C | 150 |
| ZNTS035D3D81 | 150 |
+--------------+------+
Then ; from db2 I need to do:
select ip_address from ZNTS035D41E3 order by date limit 1;
select ip_address from ZNTS0344E3BE order by date limit 1;
select ip_address from ZNTS037FB6ED order by date limit 1;
select ip_address from ZNTS037CD31C order by date limit 1;
select ip_address from ZNTS035D3D81 order by date limit 1;
So ... is it possible to join both queryes , so far I have:
select ftth_cpe_history.ip_address from (select fsan from ftth_cpe_snap.fsan_top_100 order by hits desc limit 5) ffsan ;
It returns :
ERROR 1054 (42S22): Unknown column 'ftth_cpe_history.ip_address' in 'field list'
I dont know how to continue ...
Any idea would be wellcome,
Thanks.