取一个date数据类型的年份
where year(date) = 1997
purchase_date between Prices.start_date and Prices.end_date
选择一个date数据“2020-19-12”的左七位数字作为month的标记。
left(trans_date, 7) as month
计算两个时间之差(前者减后者)
join XXX on datediff(a.visited_on, b.visited_on) between 0 and 6