Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
13.
SELECT FirstName, LastName, Year, Country
FROM Student
WHERE (Country = 'Romania' OR Year = '2') AND StudentID NOT IN
(SELECT StudentID
FROM Student
WHERE Country = 'Romania' AND Year = '2');
33.
SELECT TOP 1 FirstName, LastName, BirthDate, Year
FROM Student
WHERE Year='2'
ORDER BY BirthDate DESC;
USE [#DBMS-English]
GO
/****** Object: Table [dbo].[Student] Script Date: 10/22/2018 11:17:19 AM
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Student](
[StudentID] [bigint] IDENTITY(101,1) NOT NULL,
[FirstName] [nvarchar](50) NULL,
[LastName] [nvarchar](50) NULL,
[BirthDate] [date] NULL,
[City] [nvarchar](50) NULL,
[Country] [nvarchar](50) NULL,
[Nationality] [nchar](10) NULL,
[Status] [nchar](15) NULL,
[Year] [tinyint] NULL,
[PhoneNumber] [nchar](15) NULL,
[AverageGrade] [decimal](4, 2) NULL,
CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED
(
[StudentID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[Student] ON