0

I have a target where I have this DUPLICATE checker with COUNT for multiple arrays. As we can see. Any suggestions on how I make this work? Thank you and have a nice day.

DATA:

id value
1 [5,6,8,4,2]
2 [2,3,4,1,8]
3 [9,3,2,1,10]

Normal result:

number count
1 2
2 3
3 2
4 2
5 1
6 1
7 0
8 2
9 1
10 1

This is my target result with sorting (Highest count):

number count
2 3
1 2
3 2
4 2
8 2
5 1
6 1
10 1
9 1
16
  • What is the type of the value column? Commented Dec 23, 2022 at 10:28
  • Hello @TimBiegeleisen. Varchar 255. Thank you Commented Dec 23, 2022 at 10:30
  • 1
    I suggest that you stop storing your data this way. Commented Dec 23, 2022 at 10:31
  • 1
    about "storing your data this way": Is storing a delimited list in a database column really that bad? Commented Dec 23, 2022 at 10:54
  • 1
    Final comment, you can also create some data and test of it behave bad. An example of adding a longer record is here: dbfiddle.uk/2PiS10JN (questions/comments about this should go in another question, not as follow-up here) Commented Dec 23, 2022 at 11:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.