How to show number of times as output?

i have a table books_issue_details. I would like to show as output
books table:
book_id,book_name,author_name,etc..
book_issue_details
columns book_id,issue_id,student_id,issue_date
output:
title 1 has been issued o times
title 2 has been issued 4 times

Use outer join:
with books as (
               select 1 book_id,'A' book_name from dual union all
               select 2,'B' from dual
     book_issue_detail as (
                           select 2 book_id,99 student_id from dual
select  'Title ' || t1.book_name || ' has been issued ' || count(t2.book_id) || ' times.' cnt
  from      books t1
        left join
            book_issue_detail t2
          on t2.book_id = t1.book_id
  group by t1.book_id,
           t1.book_name
CNT
Title A has been issued 0 times.
Title B has been issued 1 times.
SQL> SY.

Similar Messages

  • How to show number of days:hours:min:second

    Hi !
    Need your help on this one:
    I have to calculate the number of (  Days;Hours:Minute:Second  ) that a ticket have been opened
    But I have a problem to display the format that I want:  DD:HH:MM:SS
    EX:the ticket have been opened 2011-05-03 11:00:00
    first I create a formula to show number of second to show how long the ticket have been opened since the currentDate in seconds
    Formula Name is:
    {@number of seconds OpeningTime}
    Crystal Syntax:
    DateTimeVar dt1:= {@DTOpenDate};
    DateTimeVar dt2:= {@CurrentDateTime};
    If dt2 >= dt1 Then
    NumberVar ds:= (Date(dt2) - Date(dt1))*86400; 
    NumberVar hs:= (Hour(dt2) - Hour(dt1))*3600; 
    NumberVar ms:= (Minute(dt2) - Minute(dt1))*60;
    Numbervar ss:= Second(dt2) - Second(dt1);
    NumberVar ts:= dshsms+ss)
    Else
    NumberVar ds:= (Date(dt2) - Date(dt1))*86400;
    NumberVar hs:= (Hour(dt2) - Hour(dt1))*3600;
    NumberVar ms:= (minute(dt2) - Minute(dt1))*60;
    NumberVar ss:= Second(dt2) - Second(dt1);
    NumberVar ts:= dshsms+ss)
    then I create another formula to display the format that I want:Ex:if the ticket have been opened for about 25hh:00mm:00ss
    i want to show 01:01:00:00
                             DD:HH:MM:SS
    Formula name: {@DTConversionOpeningTime}
    I use Crystal Syntax:
    WhilePrintingRecords;
    StringVar Days1;
    StringVar Hours1;
    StringVar Minutes1;
    StringVar Seconds1;
    NumberVar Duration:=0;
    Duration:= {@number of seconds OpeningTime};
    If Duration < 0 Then
      "Cannot have a time less than zero"
    Else
      (Days1:=ToText(Truncate(Duration/86400),0);
    Hours1:=ToText(Truncate(Duration/3600),0);
      Minutes1:=ToText(Truncate(Remainder(Duration,3600)/60),0);
      Seconds1:=ToText(Remainder(Remainder(Duration,3600),60),0));
    //Display format
      (if length(Hours1) < 2 then '0')+ Days1 + ":" +
      ["0",""][length(Hours1)]+ Hours1 + ":" +
      ["0",""][length(Minutes1)] + Minutes1 + ":" +
      ["0",""][length(Seconds1)] + Seconds1;
    Thanks for your help

    Find a solution, see thread:
    Re: Converting a calculated field into format of dd:hh:mm:ss answered by Jason Long

  • How to show the processing time taken for a BPEL process in BAM report.

    Hi All,
    I have the data as below in the Data object. I would like to show the time taken for each order to complete in the report.
    instance Id     order Id     product Name     product Code     price     status     instance Time      updaterName
    1360010     ord004     Guitar     prod003     2000     requested     9/22/2008 12:12:11 PM     Invoke_InsertSalesOrder
    1360010     ord004     Guitar     prod003     2000     Approved     9/22/2008 12:15:11 PM     Invoke_OrderStatusUpdate
    This data comes from simple BPEL process where sensors are configured at the start and end of BPEL process. Also have a human task activity in between to create the time difference.
    In Enterprise link design studio, I tried to calculate the time difference using expression calculator and store it as calculated field. But that doesn't seems to work because when I execute the plan, second sensor data reaches only after human approval whereas first sensor data would be waiting for calculation and ultimately nothing comes into data object.
    How and where the calculation be done to show the processing time in the report. Please someone throw some light on this.
    Regards
    Jude.
    Edited by: user600726 on Sep 30, 2008 1:30 AM

    I would suggest modifying your data object so that the data can all be in a single row and use the sensor at the end of the process to upsert (update) the row created by the sensor at the start of the process. The time difference between two fields in the same row is then an easy calculation on a BAM report -- No EL plan should be needed.

  • How to show exponent value in adf output Text

    Hi,
    How to show values in the table column output text with exponent values like 3 ^rd^ , 2 ^2^ , Hello ^R^,etc.. ?
    Do we have any RichFormatText for the ADF output Text?
    Thanks..

    yes...got it myself...thanks..

  • How to show Date and Time with TimeZone

    Dear All,
    I have to show Date and Time with TimeZone abbreviation,
    for example:
    1) 31 March 2011 2:30 in india standard time - it should show in screen 31 March 2011 2:30 IST.
    2) 31 March 2011 2:30 in Australia/New Zealand - Eastern time zone it should show in screen 31 March 2011 2:30 AEST.
    how can i show *Australia/New Zealand - Eastern time zone to AEST*,
    I tried with format DD MMM YYYY HH:MM zzz, and i looked time zone API too.
    Appreciate your help
    Thanks
    Daya

    Dayananda wrote:
    ok, than i have to use zzzz format, as z won't help in my case, so i have to use zzzz which display descriptive value like, Indian Standard Time i.e. ISTPer the javadocs there is a very specific reason why that is a problem especially if you intend to support many timezones in one application.
    "+For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them+."
    Thus you have one single case where there can be many and moreover it can change (twice a year I believe.)
    There is a standard source for this information although when I tried it it appears to not work.
    If the app only needs to display one zone then provide a configuration value that allows a user to overload the display value.
    If the app needs to display many values then you MUST inform business users of the problem because there are duplicates and they, not you, need to decide specifically what happens in those cases.

  • How to show total search time in FAST

    Hi
    does anyone know how to enable the total time to search in FAST?
    example will be when you search for an item in google. They will show you this in the search page "About 5,190,000,000 results(0.34 seconds)"
    Thanks
    Jar

    Hi  Jar,
    You have to edit the web part "Search Statistics" of your Search Center site. Please take steps as below:
    1.Go to your search result page, edit the page.
    2.In the Middle Lower Left Zone, edit the Search Statistics Web Part.
    3. In the Web Part edit panel, check Display search response time under Result Statistics section.
    Using this way , the search will show you in the search page as :“1-10 of
    16 results Your search took 0.27 seconds.”.
    Reference:
    http://office.microsoft.com/en-us/sharepoint-server-help/customize-the-search-center-site-HA010382279.aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to show exact value in ALV output field (including space at the start)

    Hi,
    This is my Scenerio:
    In the output the field value (char type) shows "6-10-3", the actual field value has a space before the 6 " 6-10-3".
    How to incorporate this, any suggestions?
    Thanks in advance,
    Dileep.

    Hi Dileep,
    While filling the internal table of that field, conactinate with the space and fill.
    like
    concatenate space
               wa-fileld " your fild
               into wa-filed.
    appned wa to itab
    clear wa.
    hope it works.
    Regards!

  • How to show date besides time in the topmost space?

    Hi, I can't find an option in settings to make my iPad2 show the date AND the time on the screen. Time is shown by default. Is there a way to add the date?
    Thanks.

    You can try leaving feedback : http://www.apple.com/feedback/ipad.html

  • How to show number of mails stored in a postbox ?

    I'm using several local postboxes (folders) created in the Mail app to store messages by certain topics.
    When new mails arrive, the number of new (unread) mails is shown beside the postbox name, so far so good. But is there a way to also show the total number of messages (unread and read) a given postbox contains instead just counting the new ones ?

    If you are looking for third-party possibilities then search at VersionTracker or MacUpdate.

  • How to show number of replies, views, likes, bookmarks

    Is there a way to show the number of replies, number of bookmarks, number of views, number of likes for an individual forum (like Yosemite OS X) like when you click on one of the main categories (Content, Discussions, etc).
    Have not found any way to set these "attributes" when viewing the individual forums - only when viewing the "global" type collections of things.
    THanks

    check out our friend turingtest2's SITEMAP | ASC - there's some special  links to your own stuff below the Table of Contents
    for the " /content " forum main pages - make browser bookmarks after you have arrived at them and use instead of in page navigation
    If using Safari, check out our friend Etresoft: ASCPowerTools
    If other browsers, check out ASCPowerTools "Lite" workaround - Adjust the format and layout of ASC Web Pages - by Hiroto, tt2, rccharles, et al

  • How to limit number of time website appears to once in "most visited"?

    Please help. I tried to adjust settings somewhere or tuther and have ended ended up with "Most Visited" list gathering my website visits at 19 to the dozen. Could you please advise how I could set "Most Visited" list so that each visited website will only get listed once?

    See the solution to this question, but change the number of max results to the one you want:
    *[https://support.mozilla.org/en-US/questions/957018]

  • Query to display sysdate 'n' number of times...

    hi all,
    i need to get sysdate 'n' number of times as output. That 'n' will be passed at runtime....
    Thank You...

    Why not?
    satyaki>
    satyaki>select sysdate from dual connect by level <= &n;
    Enter value for n: 3
    old   1: select sysdate from dual connect by level <= &n
    new   1: select sysdate from dual connect by level <= 3
    SYSDATE
    29-DEC-08
    29-DEC-08
    29-DEC-08
    Elapsed: 00:00:00.08
    satyaki>/
    Enter value for n: 7
    old   1: select sysdate from dual connect by level <= &n
    new   1: select sysdate from dual connect by level <= 7
    SYSDATE
    29-DEC-08
    29-DEC-08
    29-DEC-08
    29-DEC-08
    29-DEC-08
    29-DEC-08
    29-DEC-08
    7 rows selected.
    Elapsed: 00:00:00.00
    satyaki>Regards.
    Satyaki De.

  • How to show data output in SSRS

    Below is my simply query.  I need to use Matrix SSRS format. I will put "Region" in "row" column, Header will use "Customer_Requested_Date" field, and will use "Amount" in the data session.
    The data output in the "Header" field will show January.....until December (current month is December).  In the Amount field under "December" (current month), I need to compute the formula like "Customer_Request_Month"
    < =  Current Month".  (I do not have the field name called Current Month, need to get a Date/Time function to display Current Month).
    How I can come up the data output under December Header field to show the current Amount in that section?
    November, 2014
    December,2014
    Region
    Amount
    CRD Month < = Current Month
    Select
    Customer_Request _Date,
    Customer_request_Month,
    Transaction_Type,
    Region,
    Amount
     From Table
    Thanks,
    Josephine
    Josey Tang

    Hi Josey,
    According to your descritption, you want to show the current month in your tablix. Right?
    In Reporting Services, we can use the Now() and datepart() function to get the current month. Please use the expression below:
    =Datepart("m",Now())
    In this scenario, since you want to show the amount of current month within the column group, you need to create another dataset which always show the data of current month. Then you can use lookup() function to get the amount value from the current dataset
    based on the Region. Please follow the steps below:
    Create a same dataset(DataSet2) using your query. Add a filter on this dataset. Make Fields!Customer_request_Month.Value
    =
    Datepart("m",Now())
    Then add a column inside of column group, using the expression below:
    =lookup(Fields!Region.Value,Fields!Region.Value,Fields!Amount.Value,"DataSet2")
    The design and result look like below:
    Reference:
    Expression Examples (Report Builder and SSRS)
    Lookup Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • HT3215 How do you keep the clock face showing all the time without the screen going dark?

    How do you keep the clock face showing all the time without the screen going dark?

    Thanks.  I saw a number of answers to the same basic question after I posted my question and apparently there are ways to to keep it on but, as you said, it will drain the battery quickly.

  • How to find the number of times method being called.....

    hi,
    can any one pls tell me how to find the number of times the method being called......herez the example....
    Refrence ref = new Refrence();
    for(int i = 0;i < arr.length; i++){
    if(somecondition){
    ref.getMethod();
    here i want to know how many times the getMethod() is calling...Is there any method to do this.. i have seen StrackTraceElement class..but not sure about that....pls tell me the solution....

    can any one pls tell me how to find the number of times the method being called......
    herez the example.... http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal ? in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

Maybe you are looking for