SQL query client fetch that has all the products
Hi all
I need a SQL query to retrieve the output as shown
Table: ACCOUNT_SUMMARY
prod_id Cust_id
101 AAA
BBB 101
101. THE CCC
102 AAA
103 AAA
102. THE CCC
: Table
Prod_id Prod_desc
101 Home_loan
Vehicle loan 102
Loan education 103
Expected results:
Cust_id Prod_desc
AAA Home_loan
AAA auto loan
Educational ready AAA
Sorry, could not understand your question clearly.
Do you want this:
WITH account_summary AS (SELECT 101 prod_id,'AAA' cust_id FROM dual UNION ALL SELECT 101,'BBB' FROM dual UNION ALL SELECT 101,'CCC' FROM dual UNION ALL SELECT 102,'AAA' FROM dual UNION ALL SELECT 103,'AAA' FROM dual UNION ALL SELECT 102,'CCC' FROM dual) ,Product AS (SELECT 101 prod_id,'Home_loan' prod_desc FROM dual UNION ALL SELECT 102,'Vehicle loan' FROM dual UNION ALL SELECT 103,'Educational Loan' FROM dual ) , acc_count AS (SELECT prod_id, cust_id ,count(*) OVER (PARTITION BY cust_id) cnt FROM account_summary ) SELECT A.prod_id,P.prod_desc FROM acc_count A, product P WHERE A.prod_id = P.prod_id AND cnt = (SELECT count(*) FROM product) ORDER BY A.prod_id
Tags: Database
Similar Questions
-
I am a beginner and I'm taking classes involving adobe programs. I am looking for 1 book that has them all in them, as an Illustrator cc, cc of the hearing, photoshop, AfterEffects everything that. This is so that I don't have a lot of books lying around. I want just a book that explains all the different programs.
I recommend you watch in a subscription to lynda.com
-
What version of Windows Movie Maker is one that has all the features
Hello
I wonder what is the best version of windows movie maker?
Which version has the most options, is easy to use and can create HD videos? In addition, Vista, or windows XP?
I'm a newbie total movie maker and would appreciate any help for localization to talk or walk through tutorials.
Thanks in advance
Hello
1. what operating system do you use?
You can install Windows Live Maker on your system for the edition/creation/sharing of movies.
Please visit the below link for more on this topic.
Windows Live Movie Maker:
http://Windows.Microsoft.com/en-us/Windows7/products/features/Movie-Maker -
y at - it a web page that lists all the supported versions of Firefox?
We wish to state our user doc recommended Firefox versions. So it is the web page that lists all the supported versions of Firefox and can also, we have a list of dates to drop support for versions currently supported?
Yes, it has changed a bit since this thread was started 9 months ago. Support for Firefox 3.6.x continues and versions 4 + lose support at the next new version is available. Support for Firefox 7 ended when Firefox 8 came out yesterday 11 / 08.
Support for 3.6.x will likely end early next year when the proposed new ESR (Extended Support Release) comes to massive institutional facilities / corporate. ESR is proposed for a week 42 version support cycle timetable of a 'standard' of the week quick release 6.
-
My Dell with xp has all the sounds. Sometimes I will leave and then it will come back on. However, not as strong, as it should be. The lights on the speakers are
Try:
- pair an inexpensive connection of headphones in the speaker of your DELL outlet and see if the problem improves.
- connect your Dell speakers to another compatible audio device to verify that the speakers are not defective.
Also visit:Caution:Absolutely no warranty express or implied is delivered with this post. The poster will be held not responsible for any physical, mental, emotional, or financial loss resulting from the use of suggestions or information contained in this message. Entities who follow the advice in this post are at their own risk. -
Troubleshooting of Windows Sidebar
When I click on 'Add gadgets' in my sidebar, the screen that shows all the pop, but all the gadgets disappear immediately, so I can't click or select one of them. If this has never happened before, and what do I do?
Hello
If you use Start - type in search-> Sidebar box should still be crash - there may be a Gadget that causes
the accident that you can help out if you can get it to run by turning off then restart in a process of elimination.You are using a version of Vista 64 bit that has gadget support the 32-bit and 64-bit files? If so, you will need to
Run the lines of the procedure above in my 1st answer in both folders.This started recently past where you could have a Restore Point before this happened?
How to make a Vista system restore
http://www.Vistax64.com/tutorials/76905-System-Restore-how.html
Hope this helps and happy holidays.Rob - bicycle - Mark Twain said it is good.
-
Sony has all the tools to ROOT their phone?
Sony has all the tools to ROOT their phone? I know that it will void the warranty but I think its safer if Sony will provide their own tool of rooting.
You can unlock the bootloader, but that does not give you root access, check the XDA forum
-
Is the Lightroom trial version has all the features as the paid version
The Lightroom trial version has all the features that the full version please
Yes, it has. If you have any specific questions, simply to explain.
Mylenium
-
I am really frustrated (in decades) that Photoshop has tools that don't make sense to me and are so hard to find when I don't want to use.
Examples (and vice versa):
Rule under the pipette
Pencil under the brush
Under Gradient paint
Sponge under Burn
Forms online
etc.
I would like a tool palette that displays all THE tools, all the time.
If someone has done one of them? Can I get a copy?
Thank you
William
There are two predefined ones for photoshop cs5 in the riding of photoshop.
MTSTUNER
-
I want to uninstall a toolbar that has been the result of the search for something specific
Hello
I want to uninstall a toolbar that has been the result of the search for printable piano music.
I uninstalled the stuff accompanying this research but I can't get rid of the toolbar. Can I just download an another toolbar as C.NET or what?I have a Dell dimension 4700 desktop, XP and I have ' yet to learn through this forum help and everyone.
Thank you
Gina Davis
Original title: how to uninstall toolbat Inbox
(IE unknown version)
Hello
Tools are what bar you referring? That's a browser or another program?
Method 1:
Run this fixit to remove it completely.http://support.Microsoft.com/mats/Program_Install_and_Uninstall/Method 2:
You can uninstall the toolbar by following the steps below:
a. open your Internet browser.
b. click on 'Tools' then 'Add-ons' in IE; Click on "Tools" and "Manage Add-ons."
c. find the add-on "Toolbar" in the list of available modules.
d. remove the add-on toolbar in Internet Explorer, select the toolbar and click "disable".
If you want to remove the toolbar, you can do this by uninstalling it in Add or remove programs. -
Original title: how to uninstall client services for netware?
When I change how a user connects power on and off a screen appears saying "client for Netware has disabled the Welcome screen and the fast user switching. To restore these features, you must uninstall client services for Netware... But it is impossible to find... Help?
Hello LindsayJune,
Click the Start button.
Click on Control Panel. Select network connections
Right click on 'Connect to the Local network', then click 'properties '.
Search for "Client Service for NetWare" slot "this connection uses the following items."
Click it, and then click the "Uninstall" button
Restart your computer.Uninstall client for Netware feature will allow the option of quick change of user on your computer.
I hope this helps.
-
HP ProBook s 4540: How can I tell if my laptop has all the spare HARD drive bay or not?
How can I tell if my laptop has all the spare HARD drive bay or not? I want to use an SSD, but also my HARD drive as secondary.
This model has only one.
Your maintenance and Service Guide here.
http://www.HP.com/CTG/manual/c03758231.PDF
Laptop HP ProBook s 4540 - videos to remove/replace
http://h20464.www2.HP.com/results.htm?SID=5229455&MEID=0B16F6F9-A9BB-4275-8FB4-57CCA3816318
REO
-
original title: OOPS! Remove Solitaire games by mistake
My husband used a cleaning program that has removed the solitaire games that come with the software package of vista. Is it possible to recover?
Hi L-959,
Try to reinstall the game Solitaire to turn on or off Windows features.
-
I used the snap, but went too far with the mouse that has placed the window out of view on the desktop. How I suddenly back
Try clicking on the Chrome icon & press f11 to maximize the screen.
Kind regards
Nicholas Lee Fagan
-
Landscape keyboard in Mode for blackBerry Smartphones has all the keys!
Really panicking here. Updated my sys to 4.7.0.75 software, and now my keyboard in landscape mode has all the keys. The keyboard looks like a hybrid of the full qwerty and suretype keyboard view portrait, with two letters in a single touch. Some keys have letters on them.
In addition, portrait view multitap keyboard has all the keys. There are exactly eight keys with letters attributed to them. Areas where there would normally be keys and letters are empty. View portrait suretype keyboard works perfectly fine.
I don't know how it happened. Someone at - he lived the same problem? Anyone got a fix?
Remove the battery for 15 seconds, then replace them.
Maybe you are looking for
-
Hola App does not work on Ipad 2 Air any work arounds?
I contacted Hola VPN and followed their advice (re-installed and changed the application settings). I can't access on my Ipad 2 Air Hola. Can someone advise me on this? The application allows you to view TV in other countries... I pay for the app htt
-
Will Firefox be configured to update for non-admins on windows 7/8
We are considering allowing Firefox in our hospital of 5000 users and are currently all Internet Exploder. None of our users are so admins on hospital systems, is it possible to push updates for windows systems 7/8? I'm help doing the doorbell, just
-
RN4220 and the FOURTH all losses of data for TWO years
Hello team NTGR and customers. I want to tell you a failstory. Two years ago, I was looking for a BIG SIN store backups of my data from the company. I have already had several old Pro RND 6 boxes and selected 4220 x 12 4 hard drives of WD RE CT. pric
-
"cooling fan does not work correctly.
Product name: HP Pavilion dv6 Notebook PC Product number: LZ801PA #ACJ Operating system: Windows 7 64-bit Erroe message: "The system has detected a cooling fan does not work correctly. . Continued operation is not recommended and can result in unpred
-
I forgot my Windows password, how do I connect to my computer.
original title: password I forgot my password to connect to my computer and I am the adminastrator. How do I ge on the computer without it? I also have some files on there that I don't want to lose.