hussein2000
May 6th, 2006, 09:15 AM
hello friend
can i use function within another function in sql statement
ex:
i have two column in the table just like
s_name Nationality
a usa
b usa
c uk
d india
e uk
f uk
g usa
h japan
i india
j japan
k uk
l india
m usa
n japan
o india
p japan
q usa
r japan
here i want to display the nationality , nationality number and percentage of each nationality from the total of all nationality
i use this statement but not work
SELECT nationality,count(Nationality) AS Nat, sum(count(Nationality)) AS FROM Country
group by Nationality;
so pleas help to get correct answer
thanks
can i use function within another function in sql statement
ex:
i have two column in the table just like
s_name Nationality
a usa
b usa
c uk
d india
e uk
f uk
g usa
h japan
i india
j japan
k uk
l india
m usa
n japan
o india
p japan
q usa
r japan
here i want to display the nationality , nationality number and percentage of each nationality from the total of all nationality
i use this statement but not work
SELECT nationality,count(Nationality) AS Nat, sum(count(Nationality)) AS FROM Country
group by Nationality;
so pleas help to get correct answer
thanks