How to select one row from a table and sum another table I have this minimal example in Oracle DB

create table a (name varchar2(10));
create table b (x number, y number);


and I wish to do this

select (select name from a where rownum &lt;=1), sum(x) from b;


but I get

ORA-00937: not a single-group group function


How can I get the result I want, that is, name from table a and sum from b?

Edit (add example)

Table A

name
=====
foo
bar


Table B

x    y
=======
1    2
10   20


Should give

foo 11
select
  a.name,
  b.sumx
from
  (select name from a where rownum &lt;=1) a,
  (select sum(x) as sumx from b) b
;