SELECT
a.id,
a.test,
(SELECT SUM(b.pocet) FROM tabulkab b WHERE b.id=a.id) AS data
FROM tabulkaa a

Podle mne by to však mělo vypadat takhle:

SELECT a.id, a.test, SUM(b.pocet) AS data FROM...