none
Unique Values RRS feed

  • Question

  • HI

    I have a table with 36 different column headings and 100k rows, see below. The  column name "Count_01"

    has only three different values i.e. 1167259, 16803, 68675 which belong to  values 1,0,-1  respectively in  "Attribute_01" and the same values in the two mentioned columns repeat up until the last row 100K. This also applies to 

    column name Count_02, Attribute_02, Count_03, Attribute_03 up until Count_36 and Attrubute_36. Now my 

    challenge is to make all columns to have unique values, eliminate duplicates and only be left with three rows for the all the columns.

    Please tell me if not clear, you help will be appreciated.

    Column 1 2 3 4 5 6 . . . . 35 36
    Row Count_01 Atrribute_01 Count_02 Atrribute_02 Count_03 Atrribute_03 . . . . Count_100 Atrribute_100
    1 1167259 1 1178569 1 1213282 -1 . . . . 1213282 -1
    2 16803 0 13464 -1 5932 0 . . . . 5932 0
    3 68675 -1 1178569 0 12297 1 . . . . 12297 1
    4 1167259 1 1178569 1 1213282 1 . . . . 1213282 1
    5 16803 0 13464 -1 5932 0 . . . . 5932 0
    6 68675 -1 1178569 0 12297 1 . . . . 12297 1
    7 1167259 1 1178569 1 1213282 1 . . . . 1213282 1
    . . . . . . . . . . .   .
    . . . . . . . . . . .   .
    . . . . . . . . . . .   .
    . . . . . . . . . . .   .
    . . . . . . . . . . .   .
    100000 1167259 1 1178569 1 1213282 1 1166759 -1 1156759 0 1213282 1

    Friday, January 17, 2020 11:29 AM

All replies

  • Hi 

    With all the SQL geniuses in this forum no one can answer me :(

    Friday, January 24, 2020 9:44 AM
  • You posted to a completely wrong forum, it's for Data Mining and your question has nothing to do with that topic. And you have a strange table design & requirement; why should we do the work for you on this?

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, January 24, 2020 10:06 AM
  • Hi Olaf

    I thought data mining is a process used to extract usable data from a larger set of raw data, and this

    is data mining related. I have been battling with this thing for long and help would really be appreciated.

    If I was dealing with few columns I would group by: but I am dealing with 36 columns and group by 

    and distinct are not working.

    Sincerely

    Friday, January 24, 2020 12:21 PM