How to parse below SQL query to ES?

thanks @rockybean, I am using java APIs to pull the data, could you please help me in making use of them for above queries ? Thanks!