Hi all,
I am running below sql inner query and it takes more to fetch results. Could you pls help me to write this sql query better way. Inner part of sql fetches the results 1 min, but after joining inner join time taking more than 15 mins.
select * from
(
Select ip_addr,
Payments_from_State
from test_payments
where concat(year,month,day) between '20210901' and '20210910'
)payment
inner join ip_addess ip
on 1=1 and ip.country_name='xxxx';