Subject Re: [firebird-support] SELECT COUNT(sub_select.*) as COUNT, sub_select.user_name ...
Author Martijn Tonies
Hi,

Firebird doesn't support "derived tables" (that's what
you're doing, not a "subselect").

Why not simply use:

select count(*), user_name
from user
group by user_name

?

> SELECT
> COUNT(sub_select.*) as COUNT, sub_select.user_name,
> sub_select.password
> FROM
> (
> SELECT
> user_name, password
> FROM
> USER sub_select
> WHERE
>
> user_name LIKE '%%'
> AND password LIKE '%%'
> AND name LIKE '%%'
> AND surname LIKE '%%'
> )

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com