如果您的表被称为带有日期,项目和值整数列的数据表,则可能会这样做
SELECt t1.day, t1.item, (t2.value - t1.value) as rateFROM datatable t1INNER JOIN datatable t2ON t1.item = t2.item AND t1.day + 1 = t2.day
欢迎分享,转载请注明来源:内存溢出
如果您的表被称为带有日期,项目和值整数列的数据表,则可能会这样做
SELECt t1.day, t1.item, (t2.value - t1.value) as rateFROM datatable t1INNER JOIN datatable t2ON t1.item = t2.item AND t1.day + 1 = t2.day
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)