Mark Papadakis wrote:
> Is something like that expressed in any way in (my)SQL?
> select column like something as a1, column like something2 as a2, a1+a2 as
> count from table order by count;
> Basically, I want to sort it based on the number of keywords found in a
> string. So, lines that contain more keywords
> should show up first.
> Of course, the above query doesn't work. Any ideas?
> Thank you,
Your question isn't clear to me.
Do you search something like this?
a.column AS a1
, b.column AS a2
, a.column + b.column AS count
columnTable AS a
, columnTable AS b
a.id <> b.id
AND a.value = something
AND b.value = something