Count Rows over lists of tables

Hi, i have a variable where each item is a table.  How can i return a list of their number of rows.  For example:

a,b,c,d are tables with # of rows 1,2,9,10 respectively

y: abcd

z: select count i for each table in y

z:1 2 9 10

y join z

a 1

b 2

c 9

d 10

thanks

exec gives you the query result as a list, if you know there will be only one you can run ‘first exec’:

y:{(n:x?100)}each 1 2 9 10

{first exec count i from x}each y

or

abcd!{first exec count i from x}each y

does that help at all?

If the tables are stored in the variable y, then you may use

y!count each value each y

To create a dictionary of the table names and their respective number of rows.

q)a:([]a:10?10.;b:10?3)q)b:(a:3?10.;b:3?3)q)c:([]a:12?10.;b:12?3)q)t:abcq)t!(count value@)each ta| 10b| 3c| 12