Q18 - e 2001 paper (1 Viewer)

thebigwillie

Member
Joined
Mar 25, 2004
Messages
75
Hey everyone, I'm having trouble with this question. Its an SQL statement:

FROM Contacts
WHERE State = "NSW"
SELECT Firstname, Lastname, Email
ORDER Lastname, Firstname

The bold bit is the part I dont really understand.....Whats ORDER actually mean? In the standards package they set it out like:
Firstname, Lastname, Email

The the ORDER says its Lastname, Firstname *confused*

If I attempted the question it would be like:
Lastname, Firstname, Email

But the right answer is Firstname, Lastname, Email

Could someone plz explain why it is like this? And what ORDER means? Thanx in advance:)
 

Linda N

Member
Joined
Apr 9, 2004
Messages
216
Location
Sydney
Gender
Female
HSC
N/A
I got confused too at first.
SELECT Firstname, Lastname, Email

means selecting data from those fields

ORDER Lastname, Firstname

means write your answers showing the Lastname first then Firstname then Email

I think the right answer is wrong.

The answer should be:
Lake | Fred | lake.fred@supersys.com.au
Lee | Bianca | b.lee@cruz.com.au
etc.
 

Linda N

Member
Joined
Apr 9, 2004
Messages
216
Location
Sydney
Gender
Female
HSC
N/A
Let see what other people think about this question. I'm pretty sure that our answers are right.
 

konggo

Member
Joined
Apr 30, 2004
Messages
95
Location
North Shore
Gender
Male
HSC
2004
no cause its only 3 things the email part doesnt matter answer isnt rong just thats how it is
 

Freedom_Dragon

The 36th Dragon
Joined
Oct 11, 2003
Messages
154
Location
Behind a door that will never open.
Gender
Undisclosed
HSC
N/A
thebigwillie said:
The bold bit is the part I dont really understand.....Whats ORDER actually mean?
SELECT Firstname, Lastname, Email
FROM Contacts
WHERE State="NSW"
ORDER Lastname, Firstname

Order simply means to put it in order.
Example
From Table: Contacts both Lees are from NSW
So how do u order?

Firstly order by Lastname, so first up is Lake, then Lee. There r TWO Lees, so sort their Firstname.

So basically my result from the above query for Q18 (e) is...

Lake Fred lake.fred@supersys.com.au
Lee Bianca b.lee@cruz.com.au
Lee Judy j.lee@eop.com.au
Nguyen Tranh t.nguyen@cruz.com.au

thebigwillie said:
But the right answer is Firstname, Lastname, Email
I read the notes from the marking centre & u'd still get full marks whether Lastname is b4 of after. It doesnt matter, either way u still get full marks. But jus be a bit careful with these types of question. Best thing is to go practice ur SQL.
 

CrashOveride

Active Member
Joined
Feb 18, 2004
Messages
1,488
Location
Havana
Gender
Undisclosed
HSC
2006
i just looked at the notes and i didnt see that there, FreedomDragon ?

I think that Firstname is first because of its positioning within SELECT....

select fa,fb,fc from ....
return the fields fa fb and fc in that order

The ORDER just detremines how the three fields will show up but the SELECT says in which order the fields to BE ordered are to be displayed...thats a bit long winded hope u can understand
 

thebigwillie

Member
Joined
Mar 25, 2004
Messages
75
Hmmmmm I had another look at it today.. I'm thinking the same thing.. SELECT means which way it will show up..Which is first name, lastname, email
ORDER means in which order it will turn up.. In this case in alphabetical order... Thats wot i think..
 

rckl

Member
Joined
Mar 8, 2004
Messages
80
Gender
Male
HSC
2004
thebigwillie said:
Hey everyone, I'm having trouble with this question. Its an SQL statement:

FROM Contacts
WHERE State = "NSW"
SELECT Firstname, Lastname, Email
ORDER Lastname, Firstname

The bold bit is the part I dont really understand.....Whats ORDER actually mean? In the standards package they set it out like:
Firstname, Lastname, Email

The the ORDER says its Lastname, Firstname *confused*

If I attempted the question it would be like:
Lastname, Firstname, Email

But the right answer is Firstname, Lastname, Email

Could someone plz explain why it is like this? And what ORDER means? Thanx in advance:)

FROM= which table or entity
Select= Fields to be display
WHERE= the criterial
ORDER BY= order the records, either decending or ascending
 

Freedom_Dragon

The 36th Dragon
Joined
Oct 11, 2003
Messages
154
Location
Behind a door that will never open.
Gender
Undisclosed
HSC
N/A
CrashOveride said:
i just looked at the notes and i didnt see that there, FreedomDragon ?
Ive read the notes AGAIN from the marking centre and i must have miss read it this morning at a glance. Sorry about that.

Yes, about the order in which it is displayed is supposed to be Firstname, Lastname, Email.
I checked my SQL book, indeed the order that the field is SELECT is the order that it will be displayed.

So once again
Fred Lake email
Bianca Lee email
Judy Lee email
Tranh Nguyen email
 

Linda N

Member
Joined
Apr 9, 2004
Messages
216
Location
Sydney
Gender
Female
HSC
N/A
Oh ok. So the answer was right then. I can't believe my TAFE teacher was wrong. What a shame!
 

CrashOveride

Active Member
Joined
Feb 18, 2004
Messages
1,488
Location
Havana
Gender
Undisclosed
HSC
2006
Ok anyone done Q22, the last long response question, for 2001? I think it was the hardest of the three...hmm im quite dramatically confused with it. Here's the question:

The organisation is seeking to improve data management. Write a report that proposes good file-management procedures. Include a simple sketch of a directory/folder structure for the Sales Department using information from the hierarchy diagram. Explain and justify your proposals in relation to audit requirements, file attributes, incremental backup and file and folder passwords.

the organisational chart also goes with it. Anyone that could help out, thanks =)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top