表字段和数据如下:
a b c
1 2 1
1 3 2
2 4 3
2 5 4
想问用什么sql语句实现显示数据如下:
a b c
1 2 1
2 4 3不会用group by a,b,c 吧?
a b c
1 2 1
1 3 2
2 4 3
2 5 4
想问用什么sql语句实现显示数据如下:
a b c
1 2 1
2 4 3不会用group by a,b,c 吧?
解决方案 »
- 为什么第一次和非第一次对数据库的操作时间相差这么大
- SQL Server 是否有类似VB中的String函数
- 关于declare 的用法
- 这两段简单的SQL语句有什么区别吗,怎么一个可以一个不可以
- SQL SERVER 2005连接错误
- 在应用程序中能建立和使用事务吗?
- 一条简单的SQL语句问题。
- 当日志记录表发生新增、删除、修改时,触发相应仓库表发生相应的数量变化
- 考虑到后期数据库的伸缩性,如何设计数据库呢? 给点思路。
- 为何win2000profeesional中无法连接internet上的sql server7.0?而win98却可以?(50分相送!!!)
- sql语句string到text类型的转换
- 简单的sql
drop table aa
create table aa(a int,b int,c int)
insert into aa
select 1, 2 ,1
union all select
1 ,3 ,2
union all select
2 ,4, 3
union all select
2 ,5, 4 select * from aaselect a,b,c from
( select row_number() over(partition by a order by a) fr,*
from aa )a
where fr=1
/*
1 2 1
2 4 3
*/