clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2249096 fiddles created (32115 in the last week).

create table funcionario ( id number(10) not null, nome varchar(100) not null, empresa varchar(100) not null, primary key (id) );
 hidden batch(es)


insert into funcionario (id, nome, empresa) values (1, 'Mario da Silva Sauro', 'Toaldo Tulio Ltda.');
1 rows affected
 hidden batch(es)


insert into funcionario (id, nome, empresa) values (2, 'Mario da Silva Sauro', 'Joao Falarz Ltda.');
1 rows affected
 hidden batch(es)


insert into funcionario (id, nome, empresa) values (3, 'Homer Simpson', 'Usina Nuclear Mr. Burns');
1 rows affected
 hidden batch(es)


insert into funcionario (id, nome, empresa) values (4, 'Robocop', 'OCP Enterprise');
1 rows affected
 hidden batch(es)


SELECT f1.nome, f3.empresa FROM (SELECT nome FROM funcionario GROUP BY nome) f1 CROSS APPLY (SELECT f2.empresa FROM funcionario f2 WHERE f1.nome = f2.nome ORDER BY f2.empresa OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY) f3;
NOME EMPRESA
Homer Simpson Usina Nuclear Mr. Burns
Mario da Silva Sauro Joao Falarz Ltda.
Robocop OCP Enterprise
 hidden batch(es)


select * from V$VERSION;
BANNER BANNER_FULL BANNER_LEGACY CON_ID
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production Version 18.4.0.0.0 Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production 0
 hidden batch(es)