Download the latest album among several tables

Hello guys,.

I would be really grateful if you could help me find a solution to this problem I am facing:

We are on Oracle 11 g Release 2.

I have 3 tables A, B and C, all the 3 tables have the following columns with the same names:

data_load_time DATE

data_load_process VARCHAR2 (100)

data_update_time DATE

data_update_process VARCHAR2 (100)

And also a foreign key - fkey NUMBER.

Now it takes - to a particular fkey (say 100), I need to pull the process between the 3 tables and last time, it is not okay if

This is the load or update columns, I just need 1 set of values, the maximum time and the process corresponding to.

For example: say for fkey = 100, I get the maximum time and the process corresponding to table A, then I get time max and the corresponding table B and table C process, the end result should be the maximum time and the corresponding process on the 3 values, I just pulled out of the 3 tables separately.

Is it an effective way to address this problem in only 1 query?.

Thanks for your help.

D

Use my query and you will see tghat everything is correct and don't worry function max (read about features analytical Dungeon dense_rank first/last)

Here's the result of my query with your sample data:

WITH AN ACE

(SELECT fkey 100,

1 January 2013 ' data_load_time,.

"XETL' data_load_process,

11 July 2013 ' data_update_time,.

'MANUAL' data_update_process

THE DOUBLE).

B AS

(SELECT fkey 100,

5 January 2013 ' data_load_time,.

'DATA_ENT' data_load_process,

25 April 2014 ' data_update_time,.

"VEND_X" data_update_process

THE DOUBLE).

c AS

(SELECT fkey 100,

1 January 2014 ' data_load_time,.

'MANUAL' data_load_process,

3 February 2014 ' data_update_time,.

"CLM_PROC" data_update_process

THE DOUBLE)

Select greatest (max (a.data_load_time),

Max (b.data_load_time),

Max (c.data_load_time)) max_data_load_time;

Decode (Greatest (Max (a.data_load_time),)

Max (b.data_load_time),

Max (c.data_load_time)),

Max (a.data_load_time),

Max (a.data_load_process)

keep (dense_rank of the first order by a.data_load_time desc),

Max (b.data_load_time),

Max (b.data_load_process)

keep (dense_rank of the first order by b.data_load_time desc),

Max (c.data_load_time),

Max (c.data_load_process)

keep (dense_rank of the first order by c.data_load_time desc)

) data_load_process,.

Greatest (Max (a.data_update_time),

Max (b.data_update_time),

Max (c.data_update_time)) max_data_update_time;

Decode (Greatest (Max (a.data_update_time),)

Max (b.data_update_time),

Max (c.data_update_time)),

Max (a.data_update_time),

Max (a.data_load_process)

keep (dense_rank of the first order by a.data_update_time desc),

Max (b.data_update_time),

Max (b.data_update_process)

keep (dense_rank of the first order by b.data_update_time desc),

Max (c.data_update_time),

Max (c.data_update_process)

keep (dense_rank of the first order by c.data_update_time desc)

) data_update_process

a

Join b

On a.fkey = b.fkey

Join c

On a.fkey = c.fkey

where a.fkey = 100

SQL >

60.

MAX_DATA_LOAD_TIME DATA_LOAD_PROCESS MAX_DATA_UPDATE_TIME DATA_UPDATE_PROCESS

-------------------------------- -------------------------------- -------------------------------- --------------------------------

VEND_X JANUARY 5, 2013 DATA_ENT APRIL 25, 2014

SQL >

----

Ramin Hashimzade

Tags: Database

Similar Questions

  • I'm not able to update firefox on my mac 10.7.5. I am also able to download the latest version.

    I get a notice telling her there are updates available, but whenever I try to update, it breaks down. The box showing the update just runs and runs, but never finished. What happened several times. I have Firefox 9.0.1 and he said: I am currently on the channel of update release. I don't know what that means.

    Some Firefox problems can be solved by performing a clean reinstall. This means that you remove Firefox program files, and then reinstall Firefox. Please follow these steps:

    Note: You can print these steps or consult them in another browser.

    1. Download the latest version of Firefox from http://www.mozilla.org office and save the installer to your computer.
    2. Once the download is complete, close all Firefox Windows (click on quit in the file menu or Firefox).
    3. Remove the Firefox installation folder, which is located in one of these locations, by default:
      • Windows:

        • C:\Program Files\Mozilla Firefox
        • C:\Program Files (x 86) \Mozilla Firefox
      • Mac: Delete Firefox in the Applications folder.
      • Linux: If you have installed Firefox with the distribution-based package manager, you must use the same way to uninstall: see Install Firefox on Linux. If you have downloaded and installed the binary package from the Firefox download page, simply remove the folder firefox in your home directory.
    4. Now, go ahead and reinstall Firefox:
      1. Double-click on the downloaded Setup file and go through the steps in the installation wizard.
      2. Once the wizard is completed, click to open Firefox directly after clicking the Finish button.

    Please report back to see if this helped you!

  • I have currently installed... Adobe creative suite Cs5 I would be un-installing it before you download the latest versions of the Cloud?

    I have currently installed... Adobe creative suite Cs5 I would be un-installing it before you download the latest versions of the Cloud?

    Versions are completely separated... There are people who have SEVERAL installed versions

    Be aware that if you ever cancel the cloud, your old version can stop working

    Cloud of reading resumes https://forums.adobe.com/thread/2089127 for ideas (see answer #1).

  • I downloaded the latest version of flash player, does not?

    I just got my computer back to be fixed and I'm redownloading everything I need.

    I have a Mac OS X Version 10.7.5 and I downloaded the latest version of flash player for it. It seems to be installed because there is a window opens saying "Thank you, enjoy flash player." or something like that after I downloaded the flash player.

    I tried several times and I STILL can't watch videos or doing things that require flash player.

    I went to my preferences system, clicked on Flash Player and went to the progress bar, and he says "plug-in version 11.9.900.117 is installed."

    However, when I go to this page: http://helpx.Adobe.com/Flash-Player.html

    And I click the "check now" button to see if flash player has been installed on my computer, it says:

    "Sorry, Flash Player is either not installed or not enabled.

    Please proceed to step 2. »

    And so I did and downloaded AGAIN. I saw the same thing once I reloaded the page and try again.

    I don't have an anti-virus program, so it can't be that.

    The flash player is enabled?

    How can I check if it has activated activate / it?

    It is usually in the Tools section of your browser.

  • I downloaded the latest version of iTunes on my book Mac pro at the end of 2013.  Where is siri?

    I downloaded the latest version of iTunes on my book Mac pro at the end of 2013.  Where is siri?

    "the ability to play music using Siri when macOS Sierra launches this month ncluding"

  • iPad will not download the latest version and does not save my iPad even if I bought more space.

    Trying to free up space and to download the latest version. Space in iCloud bought, but not backup. What I am doing wrong, like friends for help.

    What happens when you try to back up your device? You see an error message? The iCloud backup device free space on the device. You need to remove content on the iPad itself.

    What happens when you try to download the latest iOS?

  • When I sync my iPhone with iTunes, I get an error saying I need to download the latest version of iTunes.  When I try to download it says I'm using the latest version?

    I have an iPhone SE

    my iTunes is on my laptop HP addition running Windows Vista. (32 bit not 64) It is not able to upgrade to Windows 7.

    When I plug my iPhone to sync with iTunes, it gives an error message saying that I need to download the latest version of iTunes.  When I try to do, I get a message saying that my iTunes is up to date with the latest version of iTunes?   If my laptop is running vista only she does support the latest version?  If this is the problem I wish iTunes download center say the my device does not support the latest version of iTunes.  the version I currently have is the only one my device is available for download.

    How to access my library iTunes other than buying a new laptop

    IPhone WILL not work with Vista. It is not supported. Can't remember where I saw it, but there was something about Windows Vista not supported for iPhone SE. I'll keep looking.

    Found at the bottom of the iTunes download support page.  Download iTunes 12.1.3 for Windows (32 bit)

    This update allows you to synchronize your iPhone *, iPad * or iPod touch with iOS 9.x and earlier on Windows XP and Windows Vista PC.

    * iPhone OS and iPad Pro (9.7 inches) is not supported on Windows XP or Windows Vista.

  • Why not the new iPhone 6 connect to iTunes? It says I need to download the latest version of iTunes, but my version is the latest. 12.4.3.1

    I've updated iPhone 9.3.3 and iTunes for 12.4.3.1; both the latest versions

    But iTunes does not recognize my iPhone, why?

    Where you say that you need to download the latest version of iTunes? What is a ToolTip that appears in iTunes when you connect iPhone to your computer? Because if this is the case, iTunes detects your iPhone. So where is the problem? It won't let you not sync to iTunes? It won't let you save with iTunes?

  • I was prompted to download the latest version of firefox and I selected restart later... I don't want to download this version... you can cancel it for me?

    The last time that I downloaded the latest version of firefox that all my favorites have been removed. I don't want to download the latest version - please help

    No, you protect your personal data when you update Firefox.

    Firefox stored the personal data in the profile folder.

    If you are concerned then make sure to back up your data regularly.

  • I can't sync my phone to my computer and get the message that my phone doesn't have the latest version of Itunes. I downloaded the latest version on my mac, but what I do on my phone. I'm used to be able to synchronize the two.

    I am more able to sync my I phone on my Mac and get the message that my phone cannot be used because it requires a newer version of iTunes. He tells me to go to www.itunes.com to download the latest version of iTunes... I downloaded the latest version on my mac, but what I do on my phone? I used to be able to sync the two and now I can't even download the photos from my phone on my mac...

    iOS9 on a mobile device requires iTunes 12.3 or higher, which in turn requires a computer running OSX 10.8.5 or higher.  Update of the system only checks the updates for the current version of the system you run, but that itself can be updated.  It may or may not be possible to upgrade your computer to the system requirements. Find your computer on the web site of http://www.everymac.com model and near the bottom of the specification of the system section, he will tell what versions of the operating system, it is able to run. If you can not run a newer system, you will not be able to sync this phone to your current computer. If she can run 10.8.5 or higher, you can either buy a download for Apple OSX 10.8 Mountain Lion code online, or you can try to install the free El Capitan OSX 10.11.  El Capitan can run slower on older machines and require the additional purchase of RAM.  Making a big jump in versions of system is also more likely to affect the old software.

    At el capitan Snow Leopard, it will make my macbook is slow?  - https://discussions.apple.com/thread/7412959

    Mountain Lion 10.8 purchase link United States of America - http://www.apple.com/shop/product/D6377Z/A/os-x-mountain-lion

    Mountain Lion 10.8 purchase link U.K. - http://www.apple.com/uk/shop/product/D6377ZM/A/os-x-mountain-lion

    Course OSX Upgrade General information, including configuration required - http://www.apple.com/osx/how-to-upgrade/

  • If I download the latest version, version navigation history will be lost or it will remain.

    For various reasons, I like to keep my long-term history of navigation. I'm afraid if I download the latest version of this story will be lost. Can anyone help.

    THX

    Hello Mugwumps, in principle, it should work, but since you're using such a version expired, I don't think that this particular update path is something that has been tested.
    just to be safe, I recommend creating a backup of your profile (which contains all personal data, including your history) before continuing with the upgrade: backup and restore the information contained in the profiles of Firefox

  • Thunderbird 24.3.0.5144 crashes whenever I try to open it. How can I fix or should I download the latest version?

    I click on the shortcut to Thunderbird and Windows tells me immediately that the program has stopped working. He then tells me that "a problem caused blocking the program works correctly. Windows will close the program and notify you if a solution is available. Is there a solution for this? If this is not the case, should I download the latest version of Thunderbird? The new version will automatically find my settings? Obviously I can't automatically upgrade if the program closes before I open it!

    Yes, install the latest and see how it goes.

  • Where can I download the latest version of the Apple support for boot camp and Windows-10 64-bit software?

    Where can I download the latest version of the Apple support for boot camp and Windows-10 64-bit software?

    give me the link?

    I need the latest package driver.

    -Thank you

    Please use BC Assistant.

  • I just download the latest Java Version 7 update 25 update build 1.7.0_25 - b16 and all hell broke loose with FF, nothing, but nothing works.

    I just downloaded the latest updates of Java Version 7 update 25 build 1.7.0_25 - b16 and hell is loose with my FF.

    Just a few examples are when I open the browser, it opens as a band full-width in the upper part of the screen and I have to drag down and reduce the size and instead of being able to start the browser in the bar of me seems to have all the tabs online when I click on the FF icon nothing opens.

    All my previous tabs are no longer in the browser, but seem to be hidden. I disabled the 'Java' content in the "Java Panel" but nothing seems to work. I uninstalled and reinstalled FF (version 21) but nothing seems to have solved the problem - I need really your help in simple, easy to understand instructions for my beloved than FF back to a working state.

    Well, I have the theme 'default' in the guise of cat. and under the cat just «click to Call Skype» Extensions

    No one else in use.

    So now, it would appear all is well and (fingers crossed), I have confidence he's going to stay that way - my grateful thanks for your time and your support once again, I appreciate it.

  • I just downloaded the latest version of firefox, and apparently it was supposed to replace my old version, why can I still access the old version of my icon in the dock.

    I'm using mac os x version 10.7.4 and I try to update Firefox 3.5.5 version to the latest version. The Firefox icon in my doc still persists and leads me to the old version of Firefox. If it's supposed to happen?

    Some Firefox problems can be solved by performing a clean reinstall. This means that you remove Firefox program files, and then reinstall Firefox. Please follow these steps:

    Note: You can print these steps or consult them in another browser.

    1. Download the latest version of Firefox from http://www.mozilla.org office and save the installer to your computer.
    2. Once the download is complete, close all Firefox Windows (click on quit in the file menu or Firefox).
    3. Remove the Firefox installation folder, which is located in one of these locations, by default:
      • Windows:

        • C:\Program Files\Mozilla Firefox
        • C:\Program Files (x 86) \Mozilla Firefox
      • Mac: Delete Firefox in the Applications folder.
      • Linux: If you have installed Firefox with the distribution-based package manager, you must use the same way to uninstall: see Install Firefox on Linux. If you have downloaded and installed the binary package from the Firefox download page, simply remove the folder firefox in your home directory.
    4. Now, go ahead and reinstall Firefox:
      1. Double-click on the downloaded Setup file and go through the steps in the installation wizard.
      2. Once the wizard is completed, click to open Firefox directly after clicking the Finish button.

    Please report back to see if this helped you!

Maybe you are looking for

  • A few questions using Linux on Satellite L30-10 x

    Sorry to bother you people, but I had this satellite L30-10 portable x. I try to make it work with my o/s preference, what is Linux (or any unix-based), for which the goal, I need to know what's what in there, IE. 1. how chip works for the compatible

  • Printers, drop off the network

    Since I installed El Capitan, my printer started dropping in 2 way communication - so I bought another printer, thinking that he was losing his reception.  The same problem.  It's as if they are going to sleep and not wake up. The next thing that I w

  • T60 no audio; No HDA audio bus driver

    Hi all I have a T60 with a fresh install of XP Pro. Everything seems to work well except for audio. Audio controls XP show no audio device. I reloaded the audio driver (77a224ww.exe) files. When I try to complete the process by running Setup.exec in

  • If I let the the mouse pointer over the taskbar, it freezes and I can't move.

    original title: freezing of funds... If I left click on the desktop and then click on the task bar when I got on my pc and leave the pointer from there in the taskbar until the next time I use my computer, it works well. If I let the pointer anywhere

  • Color problems: the red color has disappeared from my computer

    Original title: color problems The red color has disappeared from my computer. The moniter is ok.