表1姓名补贴类别补贴标准执行日期a住宿补贴3002023-1-1a住宿补贴6002023-5-1a通讯补贴2002023-1-1a通讯补贴5002023-7-1b………………求某员工2023年全年每一个月每一类补贴的类型及其对应的金额,如何得到下面的结果日期姓名补贴类别补贴标准2023-1-1a住宿补贴3002023-2-1a住宿补贴3002023-3-1a住宿补贴3002023-4-1a住宿补贴3002023-5-1a住宿补贴6002023-6-1a住宿补贴6002023-7-1a住宿补贴6002023-8-1a住宿补贴6002023-9-1a住宿补贴6002023-10-1a住宿补贴6002023-11-1a住宿补贴6002023-12-1a住宿补贴6002023-1-1a通讯补贴2002023-2-1a通讯补贴2002023-3-1a通讯补贴2002023-4-1a通讯补贴2002023-5-1a通讯补贴2002023-6-1a通讯补贴2002023-7-1a通讯补贴5002023-8-1a通讯补贴5002023-9-1a通讯补贴5002023-10-1a通讯补贴5002023-11-1a通讯补贴5002023-12-1a通讯补贴500已经解决,方法参考:sql server - SQL Query to get the value of a product given a date - Stack Overflow