jeudi 9 février 2017

SQLite: Find the most frequent value ignoring everything after '(' within it

Vote count: 0

I'll be glad if someone could help me with SQLite query.

I am trying to find the most frequent string ignoring everything after '(' within it.

So, how it's gonna work. If I've got the strings:

England (88)

Iceland (100)

Iceland (77)

England (88)

Denmark (15)

Iceland (18)

It should return

Iceland

, because it's the most frequent country here and no matter that as a string England (88) is going to pretend.

Unfortunately, my query returns

England(88)

SQLfiddle

I've been thinking to do it by 2 steps: 1) truncate every country string 2) do script that I already written. But I failed on first step.

asked 10 secs ago

Let's block ads! (Why?)



SQLite: Find the most frequent value ignoring everything after '(' within it

Aucun commentaire:

Enregistrer un commentaire