sql - find COUNT using LIKE from an inner query without JOIN -
sql - find COUNT using LIKE from an inner query without JOIN -
so im trying generate listing of artists in table & lookup total matches within rows of different table name, not exact. cant bring together tables cause dont have col bring together on.
when run inner query preset artist name returns right count. however, running inner query returns 0 count.
just curious if knows how can using sql, or if can done. otherwise can figure out looping. here illustration of im doing:
select ar.name, (select count(*) sound au au.artist like('%'+ar.name+'%')) count artist ar order ar.name asc;
try:
select ar.name, count(*) count artist ar, sound au au.artist like('%'+ar.name+'%')) grouping ar.name
sql
Comments
Post a Comment