Select data and count in view

  • Hello,

    How can I select data from a table and row counts from multiple tables in a view

    for example:

    Select * from Settings -- it gets 1 row only

    Select count(*) from NewApps where Status = 'False'

    Select count(*) from myUsers where Status = 'Pending'

    I just want to get them all in 1 view

  • Hello,

    After some tries I did it as the below

    SELECT *,

    (select COUNT(*) from Table1 where myfield = 'False') as Expr1,

    (select COUNT(*) from Table2 where myfield = 'False') as Expr2,

    (select COUNT(*) from Table3 where myfield = 'False') as Expr3

    FROM Settings

    I hope it be useful for other searchers

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply