Oracle Discoverer Query to find out Workbook, last run and number of time executed query
SELECT A.* , B.TOTCOUNT FROM
(SELECT CASE WHEN QS_DOC_OWNER IS NULL THEN 'E' ELSE QS_DOC_OWNER END AS USERNAME , QS_DOC_NAME, QS_DOC_DETAILS, QS_CREATED_DATE LAST_USED, QS_NUM_ROWS
FROM MPEADEVL.EUL5_QPP_STATS
WHERE QS_ID IN(
SELECT MAX(QS.QS_ID)
FROM MPEADEVL.EUL5_QPP_STATS QS, MPEADEVL.EUL5_DOCUMENTS DC
WHERE QS.QS_DOC_NAME=DC.DOC_NAME
GROUP BY QS_DOC_OWNER, QS.QS_DOC_NAME, QS.QS_DOC_DETAILS)
ORDER BY LAST_USED DESC) A,
(SELECT CASE WHEN QS_DOC_OWNER IS NULL THEN 'E' ELSE QS_DOC_OWNER END AS USERNAME, QS_DOC_NAME, QS_DOC_DETAILS, COUNT(*) TOTCOUNT
FROM MPEADEVL.EUL5_QPP_STATS QS, MPEADEVL.EUL5_DOCUMENTS DC
WHERE QS.QS_DOC_NAME=DC.DOC_NAME
GROUP BY QS.QS_DOC_OWNER, QS.QS_DOC_NAME, QS.QS_DOC_DETAILS) B
WHERE A.QS_DOC_NAME=B.QS_DOC_NAME AND A.QS_DOC_DETAILS=B.QS_DOC_DETAILS AND A.USERNAME=B.USERNAME;
SELECT A.* , B.TOTCOUNT FROM
(SELECT CASE WHEN QS_DOC_OWNER IS NULL THEN 'E' ELSE QS_DOC_OWNER END AS USERNAME , QS_DOC_NAME, QS_DOC_DETAILS, QS_CREATED_DATE LAST_USED, QS_NUM_ROWS
FROM MPEADEVL.EUL5_QPP_STATS
WHERE QS_ID IN(
SELECT MAX(QS.QS_ID)
FROM MPEADEVL.EUL5_QPP_STATS QS, MPEADEVL.EUL5_DOCUMENTS DC
WHERE QS.QS_DOC_NAME=DC.DOC_NAME
GROUP BY QS_DOC_OWNER, QS.QS_DOC_NAME, QS.QS_DOC_DETAILS)
ORDER BY LAST_USED DESC) A,
(SELECT CASE WHEN QS_DOC_OWNER IS NULL THEN 'E' ELSE QS_DOC_OWNER END AS USERNAME, QS_DOC_NAME, QS_DOC_DETAILS, COUNT(*) TOTCOUNT
FROM MPEADEVL.EUL5_QPP_STATS QS, MPEADEVL.EUL5_DOCUMENTS DC
WHERE QS.QS_DOC_NAME=DC.DOC_NAME
GROUP BY QS.QS_DOC_OWNER, QS.QS_DOC_NAME, QS.QS_DOC_DETAILS) B
WHERE A.QS_DOC_NAME=B.QS_DOC_NAME AND A.QS_DOC_DETAILS=B.QS_DOC_DETAILS AND A.USERNAME=B.USERNAME;
Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!
ReplyDeleteangularjs2-Training in tambaram
angularjs4-Training in tambaram
angularjs6-Training in tambaram
angularjs Training in chennai
I always enjoy reading quality articles by an individual who is obviously knowledgeable on their chosen subject. Ill be watching this post with much interest. Keep up the great work, I will be back
ReplyDeleteData Science Training in Chennai | Data Science course in anna nagar
Data Science course in chennai | Data science course in Bangalore
Data Science course in marathahalli | Data Science course in btm
Your info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
ReplyDeleteIf you are looking for any Big data Hadoop Related information please visit our website Hadoop Training Pune page!
"Thank you very much for sharing this .
ReplyDeleteDigital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
"
Wonderful article, Which you have shared about the service. Your article is very important and I really enjoyed reading it.
ReplyDeleteDigital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery
Awesome..You have clearly explained …Its very useful for me to know about new things..Keep on blogging..
ReplyDeleteAndroid Training in Chennai
Android Online Training in Chennai
Android Training in Bangalore
Android Training in Hyderabad
Android Training in Coimbatore
Android Training
Android Online Training
Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
ReplyDeletesap training in chennai
sap training in velachery
azure training in chennai
azure training in velachery
cyber security course in chennai
cyber security course in velachery
ethical hacking course in chennai
ethical hacking course in velachery
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.
ReplyDeletejava training in chennai
java training in annanagar
aws training in chennai
aws training in annanagar
python training in chennai
python training in annanagar
selenium training in chennai
selenium training in annanagar
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeletedata science training in chennai
data science training in tambaram
android training in chennai
android training in tambaram
devops training in chennai
devops training in tambaram
artificial intelligence training in chennai
artificial intelligence training in tambaram
ReplyDeleteNice blog! Thanks for sharing this valuable information
German Classes in Bangalore
German Language Course in Hyderabad