Order by max amount of count
Hi there
I need to write a query that returns the following result:
EMP SALES AMT
ASMITH PORCHE 3
BPETERS 4x4 2
ASMITH FERARRI 1
From the following table:
CREATE TABLE TEST (
EMP VARCHAR2 (50),
SALES VARCHAR2 (50) ) ;
INSERT INTO TEST (
EMP, SALES)
VALUES ('ASMITH' ,'PORCHE' );
INSERT INTO TEST (
EMP, SALES)
VALUES ('ASMITH' ,'PORCHE' );
INSERT INTO TEST (
EMP, SALES)
VALUES ('ASMITH' ,'PORCHE' );
INSERT INTO TEST (
EMP, SALES)
VALUES ('ASMITH' ,'FERARRI' );
INSERT INTO TEST (
EMP, SALES)
VALUES ('BPETERS' ,'4X4' );
INSERT INTO TEST (
EMP, SALES)
VALUES ('BPETERS' ,'4X4' );
select emp,
sales,
count(*) amt
from test
group by emp,
sales
order by count(*) desc
Similar Messages
-
5508 WLC - Max amount of AP's it supports
Cant seem to find any info on this, but what is
the max amount of AP's one 5508 WLC can support ?
Cheers
daveAs per mentioned link here it is the information:
Table 3. Ordering Information for Cisco 5500 Series Wireless Controllers
Part Number
Product Name
SMARTnet 8x5xNBD
AIR-CT5508-12-K9
5500 Series Wireless Controller for up to 12 Cisco access points
CON-SNT-CT0812
AIR-CT5508-25-K9
5500 Series Wireless Controller for up to 25 Cisco access points
CON-SNT-CT0825
AIR-CT5508-50-K9
5500 Series Wireless Controller for up to 50 Cisco access points
CON-SNT-CT0850
AIR-CT5508-100-K9
5500 Series Wireless Controller for up to 100 Cisco access points
CON-SNT-CT08100
AIR-CT5508-250-K9
5500 Series Wireless Controller for up to 250 Cisco access points
CON-SNT-CT08250
AIR-CT5508-500-K9
5500 Series Wireless Controller for up to 500 Cisco access points
CON-SNT-CT08500 -
Low Value Asset max. amount exceeded. No Posting Allowed.
Dear All,
We are prchasing items under low asset value asset. where low asset value is limit - 5000.
Now system shown the error mseeage "Low Value Asset Max Amount exceeded. No Posting Allowed." at the time MIRO tcode.
PO - 41311*****************
GRN - 51000***************
Asset Items - 2 same items - value (4800 of each)
Please anyone give the replyHi Aman,
DId you create your asset when you created your Purchase Order?
Did you create 1 asset or 2?
Are you trying to enter both assets in the same line in the MIRO invoice? -
Do we have standard report to show sale order stock with amount?
Do we have standard report to show sale order stock with amount?
I try to use MB5B and MBBS but they don't show value.
MB5B show only qty
MBBS no any report.
Please kindly help.
Thank you very much.Okay Thank you very much for your suggestion.
I think I have to create a new ZProgram. T_T -
Is there a max amount of calenders in ical?
Im currently organizing my schedule and creating new calendars for different things. I've created 10 calendars and it won't allow me to create any more. Is their a max amount of calenders in ical? If not, how do i fix the problem
sbrotherhood,
The only document that I know of which describes calendar limits is: iCloud: Limits for Contacts, Calendars, Reminders, and Bookmarks.
What happens when you attempt to create more than 10?
What names are you attempting to use?
Are the calendars being created "On My Mac?" -
Max, Min and Count with Group By
Hello,
i want the max, min and count of a table, which is grouped by a column
I need a combination of these two selects:
select
max(COUNTRY_S) MAXVALUE,
min(COUNTRY_S) MINVALUE
from
tab_Country
select
count(*)
from
(select COUNTRY_TXT from tab_Country group by COUNTRY_TXT) ;
The result should be one row with the max and min value of the table and with the count of the grouped by table, not the max and min of each group! - i hope you understand my question?
Is this possible in one SQL-select?
Thank you very much
Best regards
HeidiHi, Heidi,
HeidiWeber wrote:
Hello,
i want the max, min and count of a table, which is grouped by a column
I need a combination of these two selects:
select
max(COUNTRY_S) MAXVALUE,
min(COUNTRY_S) MINVALUE
from
tab_Country
select
count(*)
from
(select COUNTRY_TXT from tab_Country group by COUNTRY_TXT) ;
The result should be one row with the max and min value of the table and with the count of the grouped by table, not the max and min of each group! - i hope you understand my question?
Is this possible in one SQL-select?
Thank you very much
Best regards
Heidi
It's not clear what you want. Perhaps
SELECT MAX (country_s) AS max_country_s
, MIN (country_s) AS min_country_s
, COUNT (DISTINCT country_txt) AS count_country_txt
FROM tab_country
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Can you assign a max amount to Journals?
Does anyone know if you can set a Max Amount to Journal entries?
If so, can you take it one step further and limit the amount each user can journal?
Thanks,
MikeNo you cannot do that in the journal module or on posting.
You can only use validation rules (or logic by crossposting a value to some acocunt if a journal goes over a certain value) to for instance check and fail validation rules if journals (based on datasource for instance) are over a certain value.
Just some thoughts,
Edwin van Geel
SAP EMEA -
Not to save customer order if net amount zero
Dear Gurus,
I want SAP not to save customer order if net amount = zero .
How can I do it by customizing?
Kind Regards,Hi,
Include VBAK-NETWR field and screen as KKON in the incompletion procedure in T.Code:OVA2
Tick the check box IC Dialog while assigning incompletion procedure to sales document type in T.Code: VUA2
System will nto allow the sales order to save if Net value field is Zero.
Hope this helps.
Regards,
Sharan -
What is the max amount of articles in Adobe DPS?
What is the max amount of articles in Adobe DPS.
Maximum Memory
32 GB (Actual) 16 GB (Apple)
Memory Slots
4 - 204-pin PC3-10600 (1333 MHz) DDR3 SO-DIMMs -
What is the max amount of ram can I put in my Macbook Pro (2010 Model)?
I was wondering what is the max amount of ram can I put in my Macbook Pro?
Here is some specs of my macbook pro:
Version: 10.7.4 (Lion)
Processor: 2.66 Ghz Intel Core i7
Memory: 4 GB 1067 Mhz DDR3
Also I bought my macbook pro in 2010 when I had Snow Lepoard on it.MacBook Pro
https://discussions.apple.com/community/notebooks/macbook_pro
https://discussions.apple.com/community/mac_os?view=discussions
http://www.apple.com/support/macbookpro -
I need to know how to fix my brothers ipod touch 3. he used the max amount of times putting in the passcode and it disabled his ipod.
Start it in DFU mode, connect it to your compter and restore it using iTunes
-
What is the max amount of RAM that I can install using Snow Leopard?
What is the max amount of RAM I can install in my MacBook Pro? Does having Snow Leopard raise the RAM limit?
Michael Velasquez II wrote:
Despite only being able to read 3GB, what is the better way to go?
qty(1) 2GB and qty(1) 1GB Stick
or
(2) 2GB sticks?
In general, for best performance, it's best to match up the same size modules in each slot (2x2 in this case). However, given that it's only going to read 3GB, I'm not sure if that holds true here. -
Help:ranking report(order by sales amount) can't have break up groups!
break group:vendor/department/sub_class
and order by sales amount in sub class level;I have split the report into 3 and change the group order after I think about the data model, at last solve the problem.
my problem is user want vendor performance report summary by vendor or by department or by subclass as option. and after select the summary level, user can select order by sales_amount,sales_gp or vendor_id. -
IPhone 5, Max Amount of Rintones?
Okay before anyone starts, I searched the subject and only found "how to make ringtones?", "how to download ringtones?", etc.... My question is there a maximum amount of ringtones one could have on an iPhone 5 w/ios6? I had a bunch when I first got it. Then I made a few more lastnight and tried to install it. In doing so, I lost a few that I had before, and some didn't get installed. I tried syncing in different modes, "all tones" and "only checked". Whatever the case, I lose a few and gain a few. So again, is there a max amount of ringtones I could store on this phone. At this moment I have 21 custom ringtones with a size of just 13.3 MB and all the stock ringtones. I remember I had more on my 3GS w/ios3.0. Just to clarify, I checked my now inactive 3GS w/ios6. I have a similar problem, but the strange part is, the same ringtones are not loaded. It seems to just sync a random few. So are these phones set up to allow only a certain size/amount of ringtones? If so, what is the magic number? I have posted this question on another forum, but didn't get any real data/answers.
I had to break down and call the Apple customer support. It turns out, the problem I had was with iTunes. For some reason, I had to remove my library and reinstall. A pain in the ***, but it finally works.
-
Low value asset max.amount exceeded
Hi all,
When doing a full settlement in CJ88, I am getting the following error: 'Low value asset max.amount exceeded. No posting allowed'. When I have defined a new asset class, I have copied from a LVA class. The new asset class is not an LVA asset class, therefore there is no limitation. Then, why am I getting the above error?
Please help.
Thanks,
Nasok
Maybe you are looking for
-
Change condition value in debit memo and credit memo
Hi Experts, When I am trying to create Credit Memo/Debit memo I could able to change the condition value for which condition type the value is there in Sales Order, but where as for other condition types it is not changeable. For example for Freight
-
Printer deliveres 2 sheets. The first is printed, the second is blank
Greetings, I have a 2007 HP LaserJet M1319fMFP multa purpose printer. It has been in storage for a while but is clean. Every thing works except this problem. It will be used as a stand alone printer in a church minestry. It now is connected to
-
Loading a Picture onto the Scene
I am trying to load a picture onto the scene by using the following action script commands: on (release) { loadMovie("Kjole1.jpg", ramme); Nothing happens when the button is released, so it doesn't work. "Kjole1.jpg" is a picture file in the same dir
-
Is there anything like Siri for iPad
I really want to speech to text option on my keyboard. Anyone found a work around.
-
Audio stereo level adjustments
Hi...I'm working on an edit with just two audio tracks, L + R, audio and video loaded straight from the camera via Log and Transfer. I have needed to adjust audio levels up and down to what's happening on the video and the only way I can do this is b