USE tempdb
GO

IF OBJECTPROPERTY(OBJECT_ID('dbo.Orders'), 'IsUserTable') = 1
  DROP TABLE dbo.Orders
GO

CREATE TABLE dbo.Orders
(
  orderid    INT    NOT NULL,
  orderdate DATETIME    NOT NULL,
  empid    INT    NOT NULL,
  custid    VARCHAR(5) NOT NULL,
  qty    INT    NOT NULL,
  CONSTRAINT PK_Orders PRIMARY KEY NONCLUSTERED(orderid)
)

CREATE UNIQUE CLUSTERED INDEX idx_UC_orderdate_orderid
  ON dbo.Orders(orderdate, orderid)

SET NOCOUNT ON
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(30001, '20030802', 3, 'B', 10)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(10001, '20031224', 1, 'C', 10)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(10005, '20031224', 1, 'A', 30)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(40001, '20040109', 4, 'A', 40)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(10006, '20040118', 1, 'C', 10)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(20001, '20040212', 2, 'B', 20)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(40005, '20040212', 4, 'A', 10)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(20002, '20040216', 2, 'C', 20)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(30003, '20040418', 3, 'B', 15)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(30004, '20040418', 3, 'B', 20)
INSERT INTO dbo.Orders(orderid, orderdate, empid, custid, qty)
  VALUES(30007, '20040907', 3, 'C', 30)