select count(*) from mytable where status=1 into cursor csr1 select count(*) from mytable where status=2 into cursor csr2 select count(*) from mytable where status=3 into cursor csr3 select a.*, b.*, c.* from csr1 a, csr2 b, csr3 c into cursor csr4is this the best solution?