Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Employee Month-Wise Service Length and Average Salary Using Sql

    Just got it done. Here is the part that I've used in the query for month-wise average salary:

    AVG(CASE WHEN (m.GrossSal + m.SkillBns) > 0 AND...

  • RE: Get Rows On Given Range

    I just want to return number of rows depending upon the value of Qty and order by last inserted rows in table2. In Table1, Paul has Qty 2, so the...

  • RE: Get Rows On Given Range

    As Paul has Qty 2, so the query should return 2 rows from table 2 for Paul. Besides, it should return 1 row for John as he has Qty value...

  • RE: Get Table Data - Historical Table

    I tried something like this as follows:

    SELECT Department, Student, Min(Start_date) AS Start_date, Max(End_date) AS End_date FROM Table GROUP BY

    Student

    Now it worked. Thanks for your cooperation.

  • RE: Sum Time in Sql

    Thanks all for the answers. Just wondering why the below query didn't work using TOP 2 directly:

    SELECT TOP 2

    k.ID,

    k.FromTime,

    ...

  • RE: Sum Time in Sql

    Thanks a lot. Works perfectly 🙂 🙂

Viewing 6 posts - 1 through 6 (of 6 total)