Ten most recent

I'm trying to find the ten (or any number) most recent receipts for items.  TOP works fine for one item at a time but I need all items with their ten most recent receipt dates.
Sample Data
ItemNmbr
DateRecd
UnitCost
70000
2/1/2003
24.2784
70000
2/25/2003
30.85
70000
2/25/2003
30.77
70000
3/27/2003
30.85
70000
3/27/2003
30.81
70000
3/27/2003
30.85
70000
3/27/2003
30.77
70000
5/13/2003
30.85
70000
5/13/2003
30.75
70000
5/27/2003
30.85
70000
5/27/2003
30.83
70000
7/14/2003
30.84
70000
7/14/2003
30.85
70000
8/13/2003
30.85
70000
8/13/2003
30.82
70000
10/31/2003
30.85
70000
10/31/2003
30.81
70000
11/14/2003
30.85
70035
1/2/2007
289.21
70035
1/2/2007
289.22
70035
1/23/2007
291.52
70035
1/23/2007
291.54
70035
5/16/2007
277.66
70035
5/16/2007
277.66
70035
7/5/2007
267.68
70035
7/5/2007
267.69
70035
8/30/2007
264.45
70035
9/11/2007
264.45
70035
9/11/2007
264.44
70035
10/29/2007
240.8
70035
10/29/2007
240.8
70035
2/27/2008
249.67
70053
3/15/2006
323.44
70053
3/15/2006
323.53
70053
3/22/2006
323.59
70053
3/22/2006
323.44
70053
7/8/2006
312.9
70053
7/8/2006
312.78
70053
12/7/2006
332.3
70053
12/7/2006
332.18
70053
1/10/2007
342.71
70053
1/10/2007
342.77
70053
2/16/2007
348.54
70053
2/16/2007
348.43
70053
4/30/2007
355.29
70053
4/30/2007
355.26
70053
5/17/2007
355.46
70053
5/17/2007
355.52
70053
6/7/2007
341.28
70053
6/7/2007
341.19
70053
6/11/2007
345.54
70053
6/11/2007
345.28
70053
7/4/2007
341.27
70053
7/4/2007
341.56
70053
10/11/2007
329.51
I've been trying to use RANK to do this but can't quite get it. 
Thanks

Select ItemNmbr, DateRecd,UnitCost from
(select *, row_number() Over(Partition by ItemNmbr Order by DateRecd desc) rn from test) t
where rn<=10

Similar Messages

  • Can't See Most Recent Episodes Without Subscribing?

    I'm experiencing a couple weird issues with my weekly podcast in iTunes, NF Show.
    https://itunes.apple.com/us/podcast/nf-show/id829116093?mt=2#
    1. When you go to the show page in iTunes, it shows ten episodes, but not the ten most recent episodes. Instead, the newest episode listed is from over a month ago. People are going to the page and claiming that iTunes doesn't have our last five episodes. Yet when I subscribe, I can see and get access to all the episodes. Is there any way to correct this so the iTunes show page actually shows the ten most recent episodes?
    2. Previously I posted this URL for people to get to the show on iTunes: https://itunes.apple.com/us/podcast/nf-show/ But when you go there, you now get an error message stating the show isn't available in the U.S. That's really weird since the show is produced and hosted in the U.S., and the link worked before. Now, https://itunes.apple.com/us/podcast/nf-show/id829116093?mt=2# seems to be the only way to get there. Any idea why?
    Thank you very much!

    Thanks so much for your insight, Roger. I've resigned myself to waiting to see if it will resolve itself, but now I seem to have an even worse problem that has developed: my podcast no longer seems to be "available in the U.S. store". When I do a search for it on Google, the URL for it now includes a "/ca/" for Canada, but that also doesn't work. Occasionally when trying to access it from the U.S. store, it says it's not available in that store but in another country's, and when I confirm to try retrieving it there... it also says not available.
    I'm not sure what changed to cause this issue. Strangely, I'm personally subscribed to the show in iTunes, and I'm still getting the latest episodes, but when I try to go to the show's information page from my subscription, it says it can't get there due to a "temporary problem." And now, I just updated my iTunes to the latest version and the subscription is blown away. Have you heard of something like this happening before, or any idea what's going on?

  • Display most recent content

    I have a large xml file filled with news articles. Is there a
    way set a limit on the number of items that are displayed on my
    webpage? For example, display the ten most recent items.
    Thanks,
    Eric

    Hi Eric,
    we have a similar post that presents a solution of how to do
    your request.
    You can find it
    here.
    Diana

  • When I sort by date added in Column View in Finder, how can I make the most recent files appear at the top of the list?(Mavericks)

    In 10.8, when I sorted Finder by date added or date created in column view, the most recent files would appear at the top of the list. Currently, this happens as it should in every single view mode EXCEPT column view (which is pretty much the only view I ever use). Currently, I have a folder with over 2000 files in it that date back to 2011, so now I have to scroll for like ten minutes just te get to files that were most recently added. Who in their right mind would want to sort by last modified with the oldest result listed FIRST? Ridiculous. I can't figure this out. Any help?

    Thanks for the reply leroydouglas! Unfurtunately this doesn't cause the column to be ordered correctly either. After selecting this option, the files seem to be ordered by label, and the most recently added file is somewhere in the middle of the list. I'd like it to be at the top, and have other files/folders descend in retrochronological order by their add date.
    Any other input from the community would be greatly appreciated, even if it's just confirming that this is/is not expected behavior. I'd be super bummed to find out that this IS expected behavior, as it's really counterintuitive and extremely inconvenient.
    Thanks again!

  • I just updated my software to maverick and my iTunes to the most recent version and i can no longer transfer songs from my iTunes to my iPod

    i just updated my software to maverick and my iTunes to the most recent version and i can no longer transfer songs from my iTunes to my iPod. The tracks stay gray with a stagnant circle beside them in the left column. Any ideas?

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync/delete all music and resync
    To delete all music go to Settings>General>Usage>Storage>Music>Tap edit in upper right and then tap the minus sign by All Music
    - Reset all settings                 
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       

  • I have a 3rd gen iPod touch and I downloaded the most recent itunes, ever since I did, only the first song syncs to the ipod. As soon as it gets to the second, it xtill says its syncing. However, nothing happens. How do I fix this?

    I have a 3rd gen iPod touch and I downloaded the most recent itunes, ever since I did, only the first song syncs to the ipod. As soon as it gets to the second, it still says its syncing. However, nothing happens. How do I fix this? I have restored and updated the ipod. I have the new iTunes. I have restarted my computer checked the connection and everything.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • No play/audio after most recent upgrade

    I upgraded to the most recent itunes a couple days ago, and ever since iTunes will only play videos, but very choppy and without audio. Songs will not play at all, and in general itunes is moving very sluggishly. This problem has affected all audio on my computer, as no programs produce sound. Connecting to headphones or speakers also does not change anything. Help!

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • Collapsed view: how to see "most recent unread message" instead of "first unread message" in a thread in Mail

    Hey all,
    I use the inbuilt Mail-software on my Macbook with Lion 10.7 and I constantly overlook new messages in a thread, as I organize by conversation and usually have all my threads in 'collapsed view'. For some reason Mail seems to prefer showing the 'first', i.e. the earliest unread message as the one message that I see in collapsed. If there are newer messages already in the thread, I don't see them, unless I un-collapse the thread. I find this really unintuitive and annoying, my inbox seems far more static than it really is.
    Is there any way to change this and have Mail show me the most recent unread message as the message I see in collapsed view?
    I appreciate any advice.
    Thanks, Carl
    PS: BTW, I have the same problem on my iPhone, double props to you if you can solve it for both Mail and iPhone!

    Mail
    Preferences
    Viewing
    Check put most recent message at top

  • I've updated to the most recent version of iTunes and I can no longer see any of my old music on my mac.  All the music is still available on my ipad.  How can i download the music on my mac?

    I've updated to the most recent version of iTunes and I can no longer see any of my old music on my mac.  All the music is still available on my ipad.  How can i download the music on my mac?

    First, are you positive it is really not there?  Have you looked in your iTunes folder in your Music folder, and in the media folders there? Do you see your media files?
    If your media are gone it is a lot easier to restore from a proper computer backup.  Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was planned with you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchases which can be transferred to a computer.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only purchases from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software.  See this document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991

  • I just tried to install the 11.4 update (or whichever one is the most recent update as of 1/26/2014) and when it failed i tried to install manually and now whenever i try to use it, i get the following error: the application has failed to start because MS

    i just tried to install the 11.4 update (or whichever one is the most recent update as of 1/26/2014) and when it failed i tried to install manually and now whenever i try to use it, i get the following error: "The application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem." Right after i click ok i then get this error: "Itunes was not installed correctly. Please reinstall Itunes. Error 7 (Windows error 126)." I tried to uninstall Itunes and then reinstall the 11.03 version but that didnt work either. I want to know if i copy all of the music in my itunes folder to an external without consolidating can i still transfer all my itunes music from my current windows xp pc to a brand new one and have my current itunes library in my new pc? Basically i just want to know 3 things: What exactly does consolidating the itunes library do? Can i copy, paste, and transfer my itunes library to an external and from there to a new pc? Will i be able to transfer my itunes library without consolidating the files?

    I have found a temporary solution, allowing the previous version of iTunes (v. 11.1.3 (x64) in my case) to be re-installed.  It will allow you to re-establish use of iTunes until the Apple software engineers fix the most recent disasterous upgrade (v. 11.1.4).  Please see and follow the procedure in the following article:http://smallbusiness.chron.com/reverting-previous-version-itunes-32590.html   The previous version works beautifully.

  • My Mac OS, 10.5.8, won't support the most recent Firefox and I need the most recent version it WILL support and how to get it, as it's not on this site.

    I need a way to get a more recent but not current version of Firefox that my computer, a PowerPC processor Mac, will support. I am running OS X version 10.5.8. This processor/computer will not run Lion and the most recent version of Firefox will not run on it either.
    On my second computer, same type, a newer version of Firefox crashes constantly while in Yahoo!

    Firefox 3.6.x is the last available from Mozilla for PPC Macs. <br />
    http://www.mozilla.com/en-US/firefox/all-older.html

  • My iPhone 4 will not sync my new voice memos from the "Voice Memos" app to my computer. This is frustrating, should not be so hard, can someone please help. I use PC with windows 7 with iPhone version 6.1.3 and iTunes most recent. Thanks.

    My iPhone 4 will not sync my new voice memos from the "Voice Memos" app to my computer. This is frustrating, should not be so hard, can someone please help. I use PC with windows 7 with iPhone version 6.1.3 and iTunes most recent. Thanks.

    In the Music tab of iTunes, do you have 'Include Voice Memos' checked?

  • Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoyi

    Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoying. What happened? Internet Explorer 8.0 did the same thing. This was one of the reasons why I started using Firefox to download all images. I went into Tools>Options and it only lets me set another folder. I dont want to set a specific folder I want it to always go to the last folder used. So what gives?
    == This happened ==
    Every time Firefox opened
    == possibly when the most recent updates were installed, a few days ago

    Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
    So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.

  • HT4623 I have followed the directions and my iphone is not installing the iOS 7.0.2.  My iphone is plugged into my lap top that has the most recent version of itunes.  It is a dsl connection.  Is that my problem?

    I have followed the directions and my iphone is not installing the iOS 7.0.2.  I have the most recent version of itunes on my laptop commuter.  my iphone is attached to my laptop via usb port.  The laptop uses dsl not wifi.  Is that my problem?

    Exactly what version of iTunes are you running? And DON'T say 'the latest version'... CHECK the version number. You need to be running 11.1 or higher.

  • After the most recent FF update, FF 3.6.6 will not load, citing the error message: "XULRunner / Error: Platform version '1.9.2.3' is not compatible with minVersion =1.9.2.6 / maxVersion". Tried updating XULRunner with no luck. Downloaded fresh copy and

    After the most recent FF update, FF 3.6.6 will not load, citing the error message: "XULRunner / Error: Platform version '1.9.2.3' is not compatible with minVersion>=1.9.2.6 / maxVersion". Tried updating XULRunner with no luck. Downloaded fresh copy and installed. Still no luck.
    == This happened ==
    Every time Firefox opened
    == FF updated to 3.6.6 ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    Do a clean reinstall and download a fresh Firefox copy from http://www.mozilla.com/firefox/all.html and save the file to the desktop.
    Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    You can skip the step to create a new profile, that is not necessary for this issue.
    See http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

Maybe you are looking for

  • 600 DPI image in Quicktime

    I'm working with an old program, still written with Quicktime and resources, etc. We're coming up with a problem that GWorld objects can't hold an image that large at full resolution, so we're looking for alternatives. One of them is to use the Quart

  • No GTS block during delivery even country removed from licence

    Hi, We are using GTS 7.2. When we create the order and if we remove the country from License still it allows to create the delivery and PGI. During Delivery and PGI the GTS check should happen again and that is happening but it is taking the same lic

  • How do you uninstall Windows 10 Dual Boot?

    Hello, I am running a dual boot installation of Winodws 8.1 and 10 Techical Preview, and I like to know how do you uninstall the Windows 10 from the dual boot scheme?  I think I've uninstalled previous beta versions of windows 8 by erasing the partit

  • Delete App in iTunes

    Where can I delte the app: Cydia Basic Apps, when I get the follow error: cydia basic apps wurde nicht auf apple tv kopiert, da das objekt nicht auf diesem apple tv wiedergegeben werden kann

  • What to do if I've forgotten restrictions pass code?

    what to do if I've forgotten my restrictions pass code. ten failed attempts already.