SELECT
t1.id,
t2.point_name as siteName,
t2.irrigate_name as address,
t1.index_date as timeRange,
t1.surface_index_value as surfaceIndexValue,
t1.surface_index as surfaceIndex,
t1.ten_index_value as tenIndexValue,
t1.ten_index as tenIndex,
t1.twenty_index_value as twentyIndexValue,
t1.twenty_index as twentyIndex,
t1.thirty_index_value as thirtyIndexValue,
t1.thirty_index as thirtyIndex,
t1.forty_index_value as fortyIndexValue,
t1.forty_index as fortyIndex,
t1.avg_index_value as avgIndexValue,
t1.avg_index as avgIndex
FROM
moisture_index t1
left join moisture_info t2 on t1.moisture_id = t2.id
WHERE #{endDate} >= index_date and index_date >= #{startDate}