How can I get the maximum salary of the first ascending
HelloHow can I get the maximum salary of the first in ascending order.
I need the sql query.
want my output:
Emp_name salary
A 5000
SS 100
300 AA
DD 700
WW 2000
Thank you
Walid.
Here is an example:
SQL> with mytable as
2 ( select 'aa' as col1, 300 col2 from dual union all
3 select 'ss' as col1, 100 col2 from dual union all
4 select 'a' as col1, 5000 col2 from dual union all
5 select 'dd' as col1, 700 col2 from dual union all
6 select 'ww' as col1, 2000 col2 from dual )
7 select col1, col2
8 from mytable
9 order by decode(row_number() over (order by col2 desc),1,0,1),col2;
CO COL2
-- ----------
a 5000
ss 100
aa 300
dd 700
ww 2000
SQL>
Nicolas.
Tags: Database
Similar Questions
-
How can I get the first pro trial subscription to start
I have subscribed to a trial subscription. I think I downloaded successfully the first pro - there is at least one message on the initial screen of .saying what he is up to date. However, there is no place here after the Premiere Pro icon where you can click to open, as shown in the tutorials. What I am doing wrong?
This is the reason why you are unable to start. First pro is compatible with 64-bit computers only.
You can check the link for more details below:
https://helpx.Adobe.com/Premiere-Pro/system-requirements.html
Note:
If the processor is 64-bit, and if you had installed 32 bit OS, format it and install 64 bit OS.
If the processor is 32-bit, you must get the 64-bit processor.
or you can download version CS 4 and use it as of the trial that is compatible on 32-bit computer. However, it is not available for purchase.
-
How can I get the first line of a paragraph style indent, but others not in withdrawal
I created a style of paragraph indented on the first line of each paragraph. In most of the books, at the start of the first line of a chapter, this line is not indented while the rest are. Is there a way to set up in InDesign CS3? Is the only way to make this work is to manually go out the tab at the start of each chapter?
2 paragraph styles.
1 paragraph style has no dash
2nd paragraph style has dash
set "next style" in 1st paragraph for paragraph 2e style style
the "next style" value in the style of paragraph 2 to "even".
Existing text.
Select all of the text
Right-click on the 1 paragraph style and select apply style then next style.
New text (typeing)
Start typing with the selected 1 paragraph style. When you press ENTER to start a new paragraph, the style will switch automatically to the 2nd paragraph style to what manually enable you return.
HTH
-mt
-
How can I get the first row in a cursor when I arrived at the end?
is it possible to set the cursor in the first line, when I reached the end of it?
Thanks in advance"... but very likely" dbms_xmlgen.restartquery "closes and reopens the cursor under the hood...".
Evidence:
SQL> declare cur sys_refcursor; t timestamp; n integer; ctx integer; begin open cur for select systimestamp t, 1 n from dual union all select systimestamp t, 2 n from dual union all select systimestamp t, 3 n from dual union all select systimestamp t, 4 n from dual; loop fetch cur into t, n; exit when cur%notfound or n = 4; dbms_output.put_line (t); end loop; dbms_lock.sleep (2); ctx := dbms_xmlgen.newcontext (cur); dbms_xmlgen.restartquery (ctx); dbms_xmlgen.closecontext (ctx); loop fetch cur into t, n; exit when cur%notfound; dbms_output.put_line ('Second run: ' || t); end loop; close cur; end; / 07.05.09 10:31:58,153181 07.05.09 10:31:58,153181 07.05.09 10:31:58,153181 Second run: 07.05.09 10:32:00,155158 Second run: 07.05.09 10:32:00,155158 Second run: 07.05.09 10:32:00,155158 Second run: 07.05.09 10:32:00,155158 PL/SQL procedure successfully completed.
If it was the same cursor timestamps should be the same :(
-
How can I get the second and third highest salary from the emp table
How can I get the second and third highest salary from the emp table in the ecah DepartmentSQL> ed Wrote file afiedt.buf 1 select empno, ename, sal, deptno 2 from ( 3 select empno, ename, sal, deptno, dense_rank() over (partition by deptno order by sal desc) as rn 4 from emp 5 ) 6* where rn in (2,3) SQL> / EMPNO ENAME SAL DEPTNO ---------- ---------- ---------- ---------- 7782 CLARK 2450 10 7934 MILLER 1300 10 7566 JONES 2975 20 7876 ADAMS 1100 20 7499 ALLEN 1600 30 7844 TURNER 1500 30 6 rows selected. SQL>
-
When I click on an address, instead of the name of domain appearing in the url field, only the IP address appears. How can I get the real domain to pop?
Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).
- Makes no changes on the start safe mode window.
- https://support.Mozilla.org/KB/safe+mode
You can attach a screenshot?
Use a type of compressed as PNG or JPG image to save the screenshot and make sure that you do not exceed the maximum file size (1 MB).
-
How can I get the max of a measurement value
How can I get the max of a measurement value?
I tried the while loop max-min-solution described in this link. But this using my myRio acceleration measurement no longer works. It seems to hang.
I use the I2C Communication.
The inner circle while loop is a bad construction. It will be either executed once, if enter the Boolean value is True, or forever if the value is false.
Put your records on the timed loop shift and eliminate inside while loop. Then your code should work.
-
How can I get the messages appear when sent even if my phone is locked. I only get messages across when I activate the phone
Settings > Notifications > Messages > display on the lock screen
-
How can I get the iMovie video files in the photo library?
How can I get the video files of "iMovie - bibliotek.imovielibrary" in the photo library?
Is to select your library from the libraries pane and choose my brackets at the top of the screen. Then select the clips you want and share file on the desktop. Then import in photos.
-
My update to Apple Watch has suspended how can I get the update?
My update to Apple Watch has suspended, how can I get the update?
What do you mean by "break"?
-
How can I get the AirPort Express 1 utility generation? I lost mine.
How can I get the AirPort Express, the utility of 1st generation? I lost mine.
Open the App Store on your device, then press Search at the bottom of the screen.
Then type: airport utility in the search field of the screen top.
-
How can I get the update iOS 9.3.5?
How can I get the update iOS 9.3.5?
Settings > general > software update
-
All my old tabs are missing after a crash. I chose "view my tabs, windows and last time ', like the start option. Many unwanted changes in tab management happened recently. For example when I close a tab in a window of the two tab, I see a blank screen (see picture). Preview display seems to be broken (see attachment). How can I get the old behaviour back?
After researching the issue, it seems that the problem was a problem of NoScript configuration. After restoring NoScript to the default values, the tab number disappeared.
Thanks for your help.
MELL-
(~ J99) Also note
mellpell said
Looks like it's a known problem with Image Tweek:
http://forums.mozillazine.org/viewtopic.php?p=14029673#p14029673
https://github.com/CAFxX/ImageTweak/issues/37
https://github.com/CAFxX/ImageTweak/issues/40 -
How can I get the message from thunderbird to stop coming when I opened my email?
How can I get the message from thunderbird to stop coming when I opened my email?
Press the alt key to make the call of menu bar
Select Tools-Options-general
Disabled the Start Page -
When I try to manually associate my watch it only gives me a 5 digit number, but not the number 6 to complete the pairing. How can I get the 6 digit number?
Hello
When pairing manually, you must press the name of 5 digits on the screen of your iPhone (when he shows the same device name that is shown on your watch, after typed it on your watch's 'i'):
Your watch then displays a six-digit code, you will then enter on your iPhone:
More information:
Maybe you are looking for
-
I forgot my administrators password to enter my computer hp beats audio laptop
I need to enter my computer, I changed my password for administrators because of my boyfriend had a coupke drinks and I forgot my password
-
Reports of test bench is more generated
Somewhere during development stopped reporting occurs. I received them very well until the end of last week. I looked at all the obvious things, but I was not able to solve the problem. I looked at the menu: "configure the report Options >" and he se
-
XP - Crash after installing the update 02/08/10
My computer crashed when it restarts on the 02/08/10 update security installation. It goes to the Windows XP screen works for about 5 minutes and restarts. After a dozen or so times he finally entered the File Check but only gets to the end of part
-
The failure of the Installation Windows 10
I have an Acer V 17 Nitro Black Edition (VN7 - 791-G) I tried more than 10 times to upgrade to Windows 10. Using the application (said I was ready to be upgraded) using a USB Microsoft Media creation tool installation disc. I tried to update each tim
-
Aspire 5755G - 9417 larger capacity hard drive
Aspire 5755G - 9417 current (original) HD is 1 TB. I'm looking to replace it with a larger. Can I use one to 1.5 or 2 TB of HARD drive in this unit or is there a restriction on the ability? Also, the initial height of the disc is 12.5 mm. It seems th