Showing records where groups of 4 are present

I have an example table (input) where I want all records which can be grouped by 4 starting with number 1 (output).
How could I accomplish this?
input:
id     le
1     a
1     b
2     c
1     d
2     d
3     d
1     e
2     e
3     e
4     e
1     f
2     f
3     f
4     f
5     f
1     g
2     g
3     g
4     g
5     g
6     g
1     h
2     h
3     h
4     h
5     h
6     h
7     h
1     I
2     I
3     I
4     I
5     I
6     I
7     I
8     I
9     I
etc..     etc..output:
id     le
1     e
2     e
3     e
4     e
1     f
2     f
3     f
4     f
1     g
2     g
3     g
4     g
1     h
2     h
3     h
4     h
1     I
2     I
3     I
4     I
5     I
6     I
7     I
8     I

Thanks again Rob it works great!
I have used your principe in the real situation and could you give me some advise how I can use less subquueries for the following:
SELECT aliquot_id,external_reference
FROM
     SELECT aliquot_id,external_reference,rn,
            4 * trunc(count(*) over (partition by u_protocol_id)/4) cnt
     FROM
         SELECT aliquot_id,u_box_code, u_protocol_id, external_reference,
                 row_number() over (PARTITION BY u_protocol_id ORDER BY external_reference ASC) rn
         FROM
            SELECT /*+ cardinality (a 100) */ a.aliquot_id,a.external_reference,su.u_box_code, tu.u_protocol_id,
                    mod(row_number() over (PARTITION BY su.u_box_code, tu.u_protocol_id ORDER BY a.external_reference DESC),96) modrn
            FROM lims_sys.sample_user su,lims_sys.aliquot a,lims_sys.test t,lims_sys.test_user tu
            WHERE su.sample_id = a.sample_id
            AND a.aliquot_id = t.aliquot_id
            AND t.test_id = tu.test_id
            AND a.plate_order IS null
           AND a.status IN ('V','P')
          WHERE modrn = 0
WHERE rn <= cnt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Webi Doesnt show records where as records found in deski  aftr SP5 Upgrade

    Hi Experts,
    Webi Doesnt show records where as records found in deski  aftr SP5 Upgrade.
    Is it bug in SP5 ?
    What could be the soultion for this ?
    Environment : BOXI R2 SP5 on Unix AIX
    Would expect your  response
    Thank you.
    Neo

    Hi Experts,
    Webi Doesnt show records where as records found in deski  aftr SP5 Upgrade.
    Is it bug in SP5 ?
    What could be the soultion for this ?
    Environment : BOXI R2 SP5 on Unix AIX
    Would expect your  response
    Thank you.
    Neo

  • Clips do not show up in the Project yet are present in timeline.

    I have something weired going on. I have a timeline with a sequence that came from version 5.5 (had to ingest XML from FCP7 via PPro CS5.5 as the CS6 is too buggy and will not work with complex  XML handling).
    I have a few clips that are present in the timeline of the sequence and are playable, yet are not present in the project tab, making it impossible to project manage and to do offline workflows. When I click reveal in project nothing happens, manual search desn't do anything either.
    Does anyone know anything about it?

    You may not always be able to do things the way you want to do them, so if I can't solve the problem directly, I will usually suggest an alternate method that achieves the end goal - to get the job done so you can get paid.  That alternate method may not be your preference, but if no one else can solve the problem either, it may be your only option.  (Well, I suppose not getting paid is also an option, but I'm skeptical anyone would choose that one.)
    I find the actual questions more important and don't usually pay attention to who's asking.  So you're likely to have to put up with me further if you keep asking questions.

  • Can i Know any standard Table where all the Subroutines are present?

    Hi Folks,
    Please let me know the Standard table name where i can find all the Forms ( Subroutines) .
    Thanks,
    Naresh

    Hi,
    There is no Std table in SAP to store all the performs used in the program.
    Generally we use SCAN statement to find all the PERFORMS used in a program.
    reward if useful
    regards,
    Anji

  • "record enable" buttons not showing up in Garage Band 10.0.3 (I have selected "show record enable"- a space in the track header opens up, but the button is not present.  Same with "input moniter".

    "record enable" buttons not showing up in Garage Band 10.0.3 (I have selected "show record enable"- a space in the track header opens up, but the button is not present.  Same with "input monitor".

    Look at all the posts in the forum from users with similar problems, it happened with the last Logic update.

  • I have a page showing up when I run my Keynote presentation that does not belong there and is not in the navigation area-how do I remove it?

    I have a page showing up when I run my Keynote presentation that does not belong there. It's not in the navigation area so there is no obvious way to delete it—how do I remove it?

    Not sure if these will help... In the navigator view, is there a triangle next to the slide that appears before the slide that does not belong? If so, click it and you might find the extra slide in there. Or try View Menu:Light Table and see if you can find it in there.

  • Logic recognizes my Edirol UA-20, sound comes through but when I hit record no sound gets recorded! The volume levels are showing sound, why won't it record? ?????u

    Why can I hear sound on the track coming through but when I hit record it turns red but doesn't record any sound?

    How are you monitoring the sound coming from Logic?
    Did you set up the audio preferences for input and output in Logic.. to reflect your setup?

  • Cannot install drivers. No Intel(R) Adapters are present in this computer

    Cannot install drivers. No Intel(R) Adapters are present in this computer
    Cannot install drivers. No Intel(R) Adapters are present in this computer
    Reads the error message I purchased an RaLink USB Wireless adapter IEEE 802.11 b installed in an XP Pro system, an Intel D925XEBC2 MB with A P4 CPU 3.80 GHZ
      I have 4 gigs of RAM installed but it reads only 2.87 RAM on system properties
    I installed the RaLink Drivers and the Ralink interface. I get a strong signal and see that the wifi is there but cannot connect. The 1394 Net adaptor #2 is showing as is the USA wireless card
    I was asked to install the PIN which I assumed meant the network security but my keyboard will only input numbers not the letters, otherwise the keyboard operates properly on notepad but not on the RaLink software
    Under other devices it shows  both the Ethernet controller and the Network controller with a question mark "?".
    I have tried uninstalling and starting the computer several times but they will not install correctly.
    The windows interface shows no wi fi system at all. After going back and forth now both windows and the RaLink interface shows no wifi system.
    When I went to https://downloadcenter.intel.com/detail_desc.aspx?agr=Y&DwnldID=18717  and downloaded the 32 bit file and tried to install it I got the error.

    Hi there,
    you're in the wrong forum, but I'll try to guide you.
    (a better forum for your question would likely be this:
    http://social.answers.microsoft.com/en-us/windows/forum/networking?tab=Threads )
    Your RALink wireless adaptor is not manufactured by Intel, that's why Intel driver download won't help you.
    You need to go here (RALink is now Mediatek) to get the drivers for your adaptor
    http://www.mediatek.com/en/downloads/
    Good luck! :)
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • TS1646 When I try to buy music, I get message saying that my credit card information does not match the bank records. My information, formatting are exactly the same as the bank. Help!

    When I try to buy music, I get message saying that my credit card information does not match the bank records. My information, formatting are exactly the same as the bank. Help!

    Look on one of your bank statements and be sure to enter the billing address exactly as it shows on the statement. Some folks forget where they actually get the statement. They put their home address in iTunes/Mac App Store and they actually get the statement at their place of employment or vice versa.

  • Need Photoshop action to record WHERE on canvas a layer is placed, NOT how many pixels it was moved.

    Hello everyone,
    I'm pulling my hair out trying to figure this out.
    I created an action:
    I have a bunch of PSD files of some pretty expensive rings that were shot at hi-res and cropped.
    Now, i have a canvas that is 996x1104 px.
    All of these rings must sized to 540px width AND positioned on the canvas at x:498px and y:706 (the bottom of the layer must touch 706px, which I did by clicking on the little tiny box at the bottom of the little square made of little squares (that's next to the x and y positions when you are on Transform mode).
    I made an action for all of these steps.
    However, when I batch a group of these hi-res ring PSDs and apply the action,
    they are always in different spots. They all need to be set on y:706px so it looks like they are all resting on the same plane.
    I found out why this is happening:
    because when I position the ring when creating the action, Photoshop records HOW MUCH in pixels I moved the layer... NOT WHERE ON THE CANVAS IT'S POSITIONED.
    This is what I need: to have Photoshop record WHERE on the canvas the layer is positioned.
    Can anyone help?
    We have so much work to do by Monday and setting up this action would definitely help us.
    Thanks so much!
    _Chris

    Did you try settings the rulers units to Percent before recording the action and see if that makes a difference?
    You might possibly need a script for your goal, in which case you could ask over on the photoshop scripting forum:
    http://forums.adobe.com/community/photoshop/photoshop_scripting

  • HT204406 iTunes Match is not working on my iPhone 4S after installing iOS 6.  I finally see a list of artists, but the songs are all empty and will not play, and no play lists are present.

    iTunes Match is not working after the iOS 6 install.  All music that was previously downloaded is gone.  When the "Music App" is opened, I see a picture of a cloud, and a progress bar that goes nowhere.  Then it goes away.  No playlists are present.  It shows artists, and albums, but all songs are empty. Nothing plays.
    Is there a fix for this, or are the Apple Servers simply totally overwhelmed, and this is a matter of being annoyed and patient until it finally connects.
    Thanks!

    Same issue for me.
    Some further peculiar things I noticed:
    Directly after updating to iOS 6 I had to switch on iTunes Match again (iPhone settings). Then I realized that my music was gone (as described above).
    Under settings -> usage one could see that the memory space was still occupied by the huge music library (i.e. there where only 9 of 64 GB free). This changed after several hours. Now there are only 9 GB used, the rest is free. So the library is really gone.
    Since then my iPhone continuously downloads some unknown data from the internet (even if all apps are closed and I deselect the use of mobile networks at the several menus in the settings). All apps are closed. The iPhone gets hot and downloads something. It downloaded nearly 400 MB in the last 48 hours via mobile networks. (I got a flatrate, so I don't really care about the data.)
    Does anyone know what this means? Thanks for any help!

  • I want to retrive data from KNVP table but it shows records in miss order.

    Hello all,
    I have written following query.
    SELECT  KPKUNNR KPKUNN2
                INTO corresponding fields of table I_KUNZJ
                FROM KNVP AS KP
                WHERE KP~PARVW = 'ZJ'
                  AND KP~KUNN2 = 'C0100'            .
    KNVP table having following customers for my condition:-
      Kunnr
      100510
      1150010
      1166835
    But it shows records in following order:-
    Kunnr  
      1150010
      100510
      1166835
    So it shows 1st record = 1150010 instead of 100510. I want to show 1st record as 100510. Can any one please tell me why it shows such miss order.

    customers::Kunnr
    100510
    1150010
    1166835
    Actually I want to select 1st record only and insted of 100510 it shows 1150010 kunnr.
    SELECT  KUNNR KUNN2
                INTO corresponding fields of table I_KUNZJ
                FROM KNVP
                up to 1 rows
                WHERE PARVW = 'ZJ'
                  AND KUNN2 = 'C0100'            .
    Becoz
    In KNVP table customers are in following order:-
    Kunnr
    100510
    1150010
    1166835
    But after selection it  shows records in following order:-
    Kunnr
    1150010
    100510
    1166835
    Edited by: megha waykar on Jan 11, 2008 8:38 AM

  • Movies do not show up on AppleTV but they are in iTunes

    I have around 220 movies in iTunes.  Most all were purchased through Apple.  I am having an issue where several of my movies are not showing up on my Apple TV.  The movies that do not show up were all purchased and watched on my Apple TV but once it synced to my iTunes library they no longer show up.. I have reset and restored everything including my entire iTunes library, took almost an entire day, but still have the same issue.  My apple TV is a 1st gen. The ones that do not show up are a mix between HD and SD so that is not the issue.  The only common thread between these movies is that they were all purchased and watched initially through my apple TV. HELP please!

    As far as the resolution, I do not have the exact info but they were all purchased through iTunes via my AppleTV.
    Examples:
    - Journey to the Center of the Earth HD and SD
    - Tranformers HD and SD
    - Journey 2: The Mysterious Island SD
    - Sherlock Holmes SD
    Thats just a few of the movies that do not show up on my AppleTV but are in iTunes and can be played on my Laptop or synced to my iPad, iPod, iPhone and iTouch.
    I have tried syncing these movies to my AppleTV and it shows syncing but completes way too quickly and the movies are not on my AppleTV.  When I look at my AppleTV via iTunes the movies are checked off so as to sync.  No exclamation point or any error for that matter ever occurs.

  • Custom field not getting populated in the "Show Results where" drop down

    Hi all,
    In appointment detail page by clicking on Add button on the user related information section , it takes us to a search layout showing the list of available users.
    Here we have to filter the user's based on a custom field which has already been created in the user object. But I am not able to add the custom field in the "Show results where" drop down for which the search has to be done.
    It is getting reflected in the normal search layouts.So Can any one tell me why the change is not getting reflected in the user related info search layout?

    I tested your use case and you are correct. I would recommend that you submit a service request to CRM On Demand customer care in reference to this issue.

  • I just updated my iPhone 4 to iOS 7.1. The apps I had previously installed are not showing on the screen. They are located in App Store icon. How do I move the icons so they are showing on the screen.

    I just updated my iPhone 4 to iOS 7.1. The apps I had previously installed are not showing on the screen. They are located in App Store icon. How do I move the icons so they are showing on the screen.

    You can move apps around in iOS 7 the same as iOS 6. Press an app icon until you see it wiggle; then drag it to where ever you want it to be. Drag it onto another app to create a folder with the two apps. Tap the Home button to stop the wiggle.

Maybe you are looking for

  • Adobe Media Encoder - AMT Subsystem Error

    When trying to open the application, I get this message: "AMT Subsystem Error Thank you for using Adobe Media Encoder CS6. The Adobe product that installed Media Encoder has not activated. Please launch and activate that Adobe product before continui

  • Awesome menu not working?

    Hey! I installed Awesome, > sudo pacman -S awesome and then went about trying to get some sort of launcher up and working, in this case the built-in "awesome-menu", by following these steps. > mkdir .awesome > cd .awesome > touch menu > nano menu The

  • How come I cannot download old purchases

    I can see them in the cloud but the download link says "downloaded." I don't have them on my computer because my iTunes library sometimes "gets lost" between my harddrive and my external harddrive. So I lose my music files. It would be nice to be abl

  • SAP ECC 6.0 Service functionalities vs. SAP CRM Service functionalities

    Hi all, My name is Chitra.  I want to make a comparison between the Service functinalities available in SAP CRM Service.  I beleieve SAP CRM has lot more functionalities for Service than SAP ECC.  But since I have not worked in Service, I would reall

  • External ASN Generation - SNC Mapping

    Hi, We are in process of configuring externally generated ASN (from 3rd party supplier) send to SNC through XI/PI and then automatically route it to backend ECC system(ECC5.0) through existing interface ( DespatchDeliveryNotification_Out - from SNC).