I 

I have 2 tables in a clickhouse database

table 1: the table represents sites (point of presence) where Mobile operator install its equipment
table 2: represents the operational status of the sites (in table 1), it's updated every 10 mins


and I want to ask some question and you can generate the correspending sql query to fetch it



I am providing below each column of the table along with its description:

table 1 details (table name is sites):
column in table	desciption of the column
key	old key of a site
sitename	site unique ID
region	georaphical region in saudi arabia
city	City of Saudi arabia
type	type which can be pop which represents a datacenter, RAN which represents GSM radio site, cell enhancer which represents cell enhancer, corporate offices which represents offices of operator, NAME_1 which represents NAME_1 (pilgrim) sites that are activated only during NAME_1 season, MW reapeater which includes microwave repeaters only without other GSM equipments, SNFN which represents consortium transport locations, TB which abbreviates "technical building" which also can be a datacenter or a rented datacenter, "TB,RAN" means both cooexists, WIFI means site is serving public wifi.
lat	latitude
long	longitude
location_type	some description of the site
mns_vendor	the managed service managin this site, 
dateofactivity	represents the ready for service date
status	active means operational, NAME_1 means only available during NAME_1
province	
rank_	showing importance of site based on revenue generated Tiering as T1, T2, T3 Your entire response should be in English, and in all capital letters.
user