"Gilles Ganault" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Here's an example of data in the CODE and COMPANIES tables:
>
> ========
> CODE table
> id=1
> number=26
> ========
> COMPANIES table
> id=x
> code=1
> ========
>
> This doesn't:
> ========
> SELECT code.number,COUNT(companies.code) FROM code,companies WHERE
> code.id=companies.code
> ========

Add "GROUP BY code.id"

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to