Viewing 6 posts - 1 through 6 (of 6 total)
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...
May 27, 2017 at 10:09 am
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...
October 19, 2016 at 11:31 am
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...
October 19, 2016 at 11:24 am
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.
September 4, 2016 at 9:38 pm
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,
...
September 4, 2016 at 9:15 am
Viewing 6 posts - 1 through 6 (of 6 total)