Friday, March 12, 2010

Some Basic SQL Queries

1) Query to select Maximum Salary from a Table

Select Max (ActualSalary) from employees


2) Query to select Minimum Salary from a Table

Select Min (ActualSalary) from employees


3) Query to select unique values from a table

Select Distinct EmpStatusCode from employees


4) Query to select 6th highest Salary

SELECT TOP 1 ActualSalary
FROM (SELECT DISTINCT TOP 6 ActualSalary FROM employees
ORDER BY ActualSalary DESC) a
ORDER BY ActualSalary


5) Query to select total count from table

SELECT count (* or field name) from employees


6) Query for ascending order display

SELECT * from employees Order by LastName


7) Query for Descending Order display

SELECT * from employees Order by LastName DESC



8) Query to insert Values into a table

INSERT INTO Persons (P_Id, Last Name, FirstName)
VALUES (5, 'Tjessem', 'Jacob')


9) Query to update values in a table

SET EmpID =1000 WHERE LastName=’Rakesh’


10) Query to delete a value from a table

Delete from employees where EmpID=1000



If you know some basic queries other than this, kindly drop it in the comment section.

Importance of Resolution Testing

Few Days back we got a bug from our client when the application was in Production Server.They got java script error and blank page while accessing a particular menu. (Find the Screen shot below)

It was straightly forwarded to the development team by our project manager.
They tried many times to reproduce the issue but they can’t.At last as usual it came to our testing team and we also tried to reproduce the same and failed.

We tried in lot of scenarios and by changing the system environment also.
At Last we changed our screen resolution into 800 * 600 pixels and tried to access the same menu which was reported by our client and we got the same error this time.

At that day we learnt a lesson to test the application by changing the screen resolution.After that we had added this scenario into our lesson learnt document and also in Test Scenario document.

Many of us were aware of this type of Resolution Testing. But due to lack of schedule we missed to execute these scenarios and these things will become very big issues to the client.

So make sure to test the application by changing the screen resolution before delivering the application to the client.






If you have any feedbacks for this post, kindly drop it in the comment section