Q1 = qlc:q([X || X <- mnesia:table(YOUR_TABLE)]),
{atomic,T1} = mnesia:transaction(fun()->qlc:eval(Q1)  end),
T1.

Replace YOUR_TABLE with the table name of your mnesia table,
insert the code above in your erlang module,
you will get the data in T1.

Also see:

Subscribe in reader