Variable=$sql Value=
select distinct
s1.`year`,
s1.`month`,
s1.`area`,
s1.`value` as restricted,
s2.`value` as herds,
s1.`value`/s2.value*100 as percent
from sam_2021_09_15 s1
inner join sam_2021_09_15 s2
using(year,month,area,frequency)
where s1.area='South West Region' and s1.quantity='Disease restricted herds-during' and s2.quantity='Herds Registered on Sam'
and s1.frequency='month' and s2.frequency='month' and s2.value>0 and s1.year>=2012
order by year asc,month asc,area asc