0% found this document useful (0 votes)
49 views3 pages

Practice On SQL

1. The document contains 19 SQL queries to perform various operations on data in tables like fetching data, filtering records, aggregating data, sorting data, etc. 2. Some example queries include fetching the first name from the Worker table using an alias, printing unique department values, finding the position of a character in a name, and showing the second highest salary. 3. The queries cover a range of SQL skills like aliases, filtering, aggregation, sorting, limiting records, joining tables, and retrieving specific records.

Uploaded by

anuj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views3 pages

Practice On SQL

1. The document contains 19 SQL queries to perform various operations on data in tables like fetching data, filtering records, aggregating data, sorting data, etc. 2. Some example queries include fetching the first name from the Worker table using an alias, printing unique department values, finding the position of a character in a name, and showing the second highest salary. 3. The queries cover a range of SQL skills like aliases, filtering, aggregation, sorting, limiting records, joining tables, and retrieving specific records.

Uploaded by

anuj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

2.
1.Cr
eat
eabov
ethr
eet
abl
esandi
nser
tthedat
aint
other
espect
ivet
abl
e.

2.Wri
teanSQLquer
ytofet
ch“
FIRST_
NAME”f
rom Wor
kert
abl
eusi
ngt
heal
i
asname
as<WORKER_NAME>.

3.Wr
it
eanSQLquer
ytof
etch“
FIRST_
NAME”f
rom Wor
kert
abl
einuppercase.

4.Wr
it
eanSQLquer
ytof
etchuni
quev
aluesofDEPARTMENTf
rom Wor
kert
abl
e.

5.Wri
teanSQLquer
ytopr
intt
hef
ir
stt
hreechar
act
ersofFI
RST_
NAMEf
rom Wor
ker
t
abl
e.

6.Wri
teanSQLquer ytofi
ndt
heposi
ti
onoft
heal
phabet(
‘a’
)int
hef
ir
stnamecol
umn

Amitabh’
from Workert
abl
e.

7.Writ
eanSQLquer
yt opr
intt
heFI
RST_
NAMEf
rom Wor
kert
abl
eaf
terr
emov
ingwhi
te
spacesf
rom t
her
ightsi
de.
8.Wr
iteanSQLquer
ytopr
intt
heFI
RST_
NAMEf
rom Wor
kert
abl
eaf
terr
epl
aci
ng‘
a’
wi
th‘A’
.

9.Wri
teanSQLquer
ytopr
intt
heFI
RST_NAMEandLAST_ NAMEf r
om Wor
kert
abl
eint
o
asi
nglecol
umnCOMPLETE_NAME.Aspacecharshoul
dsepar
atet
hem.

10.Wri
teanSQLquer
ytopri
ntdet
ail
sforWor
ker
swi
tht
hef
ir
stnameas“
Vipul
”and

Sati
sh”f
rom Wor
kert
abl
e.

11.Wr
it
eanSQLquer
ytoshowr
ecor
dsf
rom onet
abl
ethatanot
hert
abl
edoesnothav
e.

12.Wr
it
eanSQLquer
ytoshowt
het
opn(
say10)r
ecor
dsofat
abl
e.

13.Wri
teanSQLquer
ytodet
ermi
net
he5t
hhi
ghestsal
arywi
thoutusi
ngTOPorl
i
mit
method.

14.Wr
it
eanSQLquer
ytoshowt
hesecondhi
ghestsal
aryf
rom at
abl
e.

15.Wr
it
eanSQLquer
ytof
etcht
hef
ir
st50%r
ecor
dsf
rom at
abl
e.

16.Wr
it
eanSQLquer
ytoshowt
hel
astr
ecor
dfr
om at
abl
e.

17.Writ
eanSQLquer
ytopr
intt
henameofempl
oyeeshav
ingt
hehi
ghestsal
aryi
neach
depart
ment
.

18.Wr
it
eanSQLquer
ytof
etcht
hreemi
nsal
ari
esf
rom at
abl
e.

19.Wri
teanSQLquer
ytof
etchdepar
tment
sal
ongwi
tht
het
otal
sal
ari
espai
dforeachof
t
hem.

You might also like