Sql server Distinct Rows -


i have table contains data use sql server 2008 r2

+-----+------+--------+-------+------+-------+ | id  | kind |  date  | price | type | amount|  +-----+------+--------+-------+------+-------+ | 525 |  32  |1/1/2016|  240  |   0  |  3000 | | 525 |  32  |1/1/2016|  380  |   1  |  3000 | | 525 |  32  |1/1/2016|  240  |   0  |  4000 | | 525 |  32  |1/1/2016|  380  |   1  |  4000 | +-----+------+--------+-------+------+-------+ 

how can result?

+-----+------+--------+-------+------+-------+ | id  | kind |  date  | price | type | amount|  +-----+------+--------+-------+------+-------+ | 525 |  32  |1/1/2016|  240  |   0  |  3000 | | 525 |  32  |1/1/2016|  380  |   1  |  4000 | +-----+------+--------+-------+------+-------+ 

will not do?

select distnct id, kind, date, price, type, amount dbo.yourtable 

Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -