Derived Table In Sql Server
Derived tables:- Derived tables are the tables which are created on the fly with the help of the Select statement. It is...
2012-04-15
18,030 reads
Derived tables:- Derived tables are the tables which are created on the fly with the help of the Select statement. It is...
2012-04-15
18,030 reads
Pivot Table:- Pivot tables are used to summarize and display the data, specially in case of report data by means...
2012-04-14
39,621 reads
Output Clause:- The SQL SERVER 2005 gives us an Output Clause which gives us the information about each row affected by the...
2012-01-22
2,208 reads
Common table expression (CTE):- Common table expression or CTE can be described as the temporary, named record set return by...
2012-01-17
5,004 reads
Global temporary table:- Global temporary table is created in the tempdb and it is visible to all other sessions as well. Global...
2012-01-07
48,499 reads
Local temporary table:- Local temporary table is created in the tempdb and it is visible to the current user's session...
2012-01-07
8,740 reads
Table variable:- SQL Server provides an variable known as table variable which is used to store data in a similar way as we...
2012-01-07
9,441 reads
To change the collation of an database following commands can be used:
ALTER DATABASE [database name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE [database name] COLLATE Newcollation
ALTER DATABASE [database name] SET MULTI_USER
For example , suppose if the name...
2012-01-02
2,361 reads
To rename a column in a SQL Table following command can be reused:
SP_RENAME 'old table name', 'New table name'
For example,...
2012-01-02
1,863 reads
Introduction
Triggers can be defined as the database objects which perform some action for automatic execution whenever users try to do execute...
2011-11-16
12,928 reads
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
By ReviewMyDB
Part 2 of my What's New in SQL Server for the Developer series. STRING_SPLIT,...
Note: This is more of a note to myself than an attempt to preach...
Comments posted to this topic are about the item How to connect your SQL...
Comments posted to this topic are about the item Finding the Black Friday Sales...
Earlier this week I had an issue with a Win 8.1 laptop I was...
We are tracking sales for Black Friday today. We have these aggregate values:
CREATE TABLE dbo.BlackFridaySales
(
Product NVARCHAR(50) NOT NULL PRIMARY KEY,
Units INT NOT NULL
);
INSERT INTO dbo.BlackFridaySales (Product, Units)
VALUES (N'55" TV', 900),
(N'Air Fryer', 500),
(N'Noise-Cancel Headphones', 500),
(N'Robot Vacuum', 300);
I'm trying to get a ranking of the sales that would return 1, 2, 2, 3 for the product levels. Which query does this? See possible answers