Answered Questions

  • How to Overcome Employment Gap during interview.

    So you were out of work for a while and are now planning to re-enter the workforce. The idea of hunting for a job is stressful enough…and it will be even more so when you have to think about how to explain to potential employers why you were out of work for a certain period of time. Whether you got laid off from your previous employment or had to quit your job to attend to personal matters, the “gap”...

    asif

    • Sep 12th, 2017

    Please Guide me I am ASIF from Karnataka I am a average student I have completed my SSLC in 2000 June. then join PUC Science 2000-2002 Then One Year Gap 2002-2003. Then I Join Dimploma 2003-2006 Then ...

    divya

    • Feb 23rd, 2017

    I completed BE in 2010. I having no experience. I want to build my career. Can you help me to find a job. Kindly suggest a job suitable for me

  • Create a query that will display the total number of employees and of that total the number who were hired in 1980, 1981, 1982, and 1983. Give appropriate column headings.

    Star Read Best Answer

    Editorial / Best Answer

    letsconverse  

    • Member Since Sep-2009 | Sep 21st, 2009


    This one is better I guess:

    query:

    SELECT ((count(DECODE(to_char(hire_date,'YYYY'), 1995, 'c1')) )+(count(DECODE(to_char(hire_date,'YYYY'), 1996, 'c2')))+(count(DECODE(to_char(hire_date,'YYYY'), 1997, 'c3')))+(count(DECODE(to_char(hire_date,'YYYY'), 1998, 'c4')))) as TOTAL,
    count(DECODE(to_char(hire_date,'YYYY'), 1995, 'c1')) "1995",
    count(DECODE(to_char(hire_date,'YYYY'), 1996, 'c2')) "1996",
    count(DECODE(to_char(hire_date,'YYYY'), 1997, 'c3')) "1997",
    count(DECODE(to_char(hire_date,'YYYY'), 1998, 'c4')) "1998"
    FROM employees;

    Results for the above query is like:

         TOTAL       1995       1996       1997       1998
      ----------   ----------   ----------  ----------  ----------
              65             4            10           28           23

    Revert if you have a question. I'll try.
    NOTE: You may want to change the spl characters and the years based on your requiremnet.

    Thanks

    serine

    • Aug 26th, 2016

    Why did we use c1?

    ashwini

    • Jun 22nd, 2015

    Can anybody tell me how to get the count of the test cases that was run by a person?