Hello good day,
I have a problem with PL / SQL query, I want to make a select distinct to a column of a table, but I want other columns associated with the column to which I made the select distinct also appear, the query I have now is the next:
SELECT (SELECT DISTINCT FROM table1 T1.CAMPO1 T1), T1.CAMPO2, T1.CAMPO3, T1.CAMPO4, T1.CAMPO5, T1.CAMPO6 TABLE FROM T1;
I also tried to put a GROUP BY T1.CAMPO1 and I get the following error:
ORA-01427: single-row subquery returns more than one row
The summary of this is I make a select like this:
SELECT DISTINCT COL3 FROM TABLE1;
But the problem came when the select only returned the col3 column, and I wanted return all columns.
For this case I made this seleccionar:
SELECT (SELECT DISTINCT WL.BSSID FROM WLAN_SCAN_RESULTS WL), WL.ID_TC_SAM, WL.ESSID, WL.CHANNEL, WL.SECURITY, WL.WPS FROM WLAN_SCAN_RESULTS WL;
But neither give me the solutions that I wanted.
Thank you very much for your time.