In Oracle/SQL how to select rows where the value of the columns remained the same -
In Oracle/SQL how to select rows where the value of the columns remained the same -
in oracle/sql how select rows value of columns remained same
i have list of budget, each budget spread on 12 months, fixed salary each month. homecoming list of budgets value of salary remained same on 12 months.
budget month salary 5468 1 1500 5468 2 1500 5468 3 1500 5468 4 1500 5468 5 1500 5468 6 1500 5468 7 1500 5468 8 1500 5468 9 1500 5468 10 1500 5468 11 1500 5468 12 1500 3456 1 1675 3456 2 1675 3456 3 1675 3456 4 1675 3456 5 1500 3456 6 1500 3456 7 1500 3456 8 1500 3456 9 1675 3456 10 1675 3456 11 1675 3456 12 1675 3948 1 2900 3948 2 2900 3948 3 2900 3948 4 2900 3948 5 2900 3948 6 2900 3948 7 2900 3948 8 2900 3948 9 2900 3948 10 2900 3948 11 2900 3948 12 2900 9756 1 2900 9756 2 2900 9756 3 2900 9756 4 2900 9756 5 2900 9756 6 2900 9756 7 2900 9756 8 2900 9756 9 2900 9756 10 2900 9756 11 2900 9756 12 2900 9712 1 2743 9712 2 2900 9712 3 2900 9712 4 2900 9712 5 2743 9712 6 2900 9712 7 2743 9712 8 2900 9712 9 2900 9712 10 2743 9712 11 2900 5394 1 1500 5394 2 1500 5394 3 1500 5394 4 1500 5394 5 1500 5394 6 1500 5394 7 1500 5394 8 1500 5394 9 1500 5394 10 1500 5394 11 1500 5394 12 1500
count distinct
salary every budget
select budget your_table grouping budget having count(distinct salary) = 1
sql oracle oracle11g oracle10g
Comments
Post a Comment