where bilägare.pnr = fordon.pnr
group by bilägare.fnamn,bilägare.enamn;
dbms_output.put_line('Namn: '||v_fnamn||','||'Efternamn: '||v_enamn||','||'Bilar '||v_pnr);
One thing: when you have structured text such as Java code, XML or SQL/DDL, you can use our "code" button in the message editor to wrap the structured text and make it more readable.
Also I would caution you not to become too quick to use PL/SQL to solve all your database problems. There are a number of reasons why the use of stored procedures should be avoided wherever possible, including lack or portability and the extra load it places on the database server. You can do a lot with ordinary (non-procedural) SQL, although I will admit that it requires you to learn to fold your brain in ways you're not used to.
Sometimes the only way things ever got fixed is because people became uncomfortable.
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad: