sql语句,它将给我交易的最后日期 [英] Sql statement which will give me the last date of transaction

查看:194
本文介绍了sql语句,它将给我交易的最后日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


我想构建一个查询,其中每次交易每天发生时,我都必须显示每个商品的最后交易日期.

Plz需要一些帮助.

Hello


I want to build a query in which i have to display the last date of transaction for every single commodity, every time the transaction happens on each day.

Plz need some help.

推荐答案

使用where子句按事务ID过滤后,您可以简单地按日期排序. 例如select * from transactiontable where transactionid = [] order by transactiondate desc
将在第一行中为您提供最后的交易日期.
You can simply order by date after filtering by transaction id using the where clause.
e.g select * from transactiontable where transactionid = [] order by transactiondate desc
will give you the last transaction date in the first row.


这篇关于sql语句,它将给我交易的最后日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆