logs archiveIRC Archive / Freenode / #oracle / 2010 / April / 21 / 1
Junior
yello ;)
TheBonsai
m00
archangle25
i have solaris 5.10 update 6 with latest patch cluster - however im still getting the assmembler errors during the install
ive noticed that the assembler doesnt accept the -m64 switch. should i have to manually upgrade it?
TheBonsai
support.oracle.com
archangle25
i dont know which is the lowest acceptable version of the assembler...
:S im trawling support now
:(
it doesnt say anywhere that I can read but along with solaris 5.10u6 with the latest patch cluster (Apr 10) you also need patch 118683-04, which updates "as". install completes succesfully now!
TheBonsai
support told you?
archangle25
nope just guessed it
ElectabuzzAlan
hey i have a question
I'm not enticing ppl to rage at me or anything but why is oraclesql in use?
it doesnt seem very nice at all
that being said
I have to do an assignment in it
b4 i go any further
this is an oraclesql channel yes?
if not I'm sorry for wasting anyones time
Nitrodist
just ask your question ;)
         

ElectabuzzAlan
haha
Nitrodist, kthnx
basically I just ahve a bunch of queries to run on a datebase
they're pretty simple for the most part
Nitrodist
ok and?
ElectabuzzAlan
http://pastebin.org/95722
theres the schema
b) In alphabetical order, list the chains and how many stores each chain has.
i got a) done by myself
Nitrodist
that link doesn't work
ElectabuzzAlan
sry my mistake
http://pastebin.org/164403
i imagine something like "select chainname from chain group by store;"
hrm
think i might have a better idea
ok
im not sure if I want to select form chain or store
Nitrodist
you need chain name
ElectabuzzAlan
yeah
i can put a select inside a select cant i?
Nitrodist
or you could just use the store table since the FK references the name
SELECT StoreName, COUNT(*)
err
one sec
ElectabuzzAlan
select ChainName, (select count(SID) from store where StoreName=ChainName) from Chain group by StoreName order by StoreName desc;
is that completely way wrong?
Nitrodist
SELECT StoreName, COUNT(*) FROM Store GROUP BY StoreName ORDER BY StoreName;
ElectabuzzAlan
yaeh?
interesting
that would not have been apparent to me
Nitrodist
count(*) will count each group
ElectabuzzAlan
what u mean?
it will count the things that the querey is grouped by?
Nitrodist
yes
ElectabuzzAlan
cool
Nitrodist
if there is no group by clause, the query will fail
ElectabuzzAlan
nice
that's kinda neat
it's not intuitive btu once i get used to it it might not be too bad
hey plantain
Nitrodist
a similar case could be like this: SELECT PatientID, COUNTI(*) AS "Number of Cases" FROM Case GROUP BY PatientID;
ElectabuzzAlan
yeah
the AS keyword might be good here
Nitrodist
yeah, other wise it'll just say 'count'
or something
         

ElectabuzzAlan
we have a tigh arsed marker who gives marks for sh*t like that
Nitrodist
same
;)
ElectabuzzAlan
eyah, count(*)
also is it cool to say sh*t in here?
Nitrodist
got me.
ElectabuzzAlan
some channels are wankers who don't liek that
Nitrodist
can you even do that subquery at the beginning there?
ElectabuzzAlan
huh?
what do u mean?
Nitrodist
of your attempt
ElectabuzzAlan
SELECT StoreName, COUNT(*) as "Number of Stores" FROM Store GROUP BY StoreName ORDER BY StoreName; is totally working fine btw
Nitrodist
yeah
of your attempt, where you had a subquery in the selction of the columns
does that work?
ElectabuzzAlan
oh
nah idk didn't try it
doesnt work
hrm
this next question looks a bit honky
For each chain list its Name, Owner and average markup, to 2 decimal places. Hint: see format.sql.
owner is a field of chain
but can be referenced by a store
Nitrodist
how do you check the mark up
ElectabuzzAlan
itme has wsprice and saleitem has price
saleitem references item
it's a bit convoluded
but saying we need to list average markup by chain means we need to average over every product in every store
which is a sh*tload of stuff to do
Nitrodist
not really
ElectabuzzAlan
maybe make a view first of average markup by store
Nitrodist
no
ElectabuzzAlan
enlighten me kthnx
Nitrodist
average sale price - the average price / count of items for that store = average markup
err
no
(avg saleprice - avg price) / avgprice
or something
then join the 3 tables together
4 tables actually
then group by chain
err, actually just the 3
err, 4! you need the owner column from chain XD
ElectabuzzAlan
um
i can jsut average price easily?
like select average(wsprice) from item; ?
Nitrodist
SELECT ChainName, Owner, ((AVG(Price) - AVG(WSPrice)) / AVG(WSPrice) AS "Average Markup" FROM Chain, Store, Item, WHERE (...join the tables...) GROUP BY ChainName;
average markup for each item in each store
ElectabuzzAlan
wow
impressive
how I join tables?
i wonder
Nitrodist
are you kidding me
XD
ElectabuzzAlan
lol eyah i forget
I know theres a few different ways to join
nto sure which way is best for different situations
Nitrodist
ChainName = StoreName AND SID = SIStore AND Product = Code
or somehing like that
ElectabuzzAlan
u sure th ((AVG(Price) - AVG(WSPrice)) / AVG(WSPrice)) is right
ahh right
Nitrodist
no, not at all
ElectabuzzAlan
yeah
markup is avg price - avg wsp
then average markup u jsut wanna average that value over each stor dont u?
Nitrodist
for each chain
as you said
ElectabuzzAlan
hrm
Nitrodist
the averages will get the averages from each group's items
I think
ElectabuzzAlan
k
im off now
I'll cya 2moro if you're around
thnx for the help Nitrodist
Nitrodist
np
ElectabuzzAlan
i shoudl compile a list of irc strangers who have helped me
then at some point do somehting to thank them IRL
cya
balek
hi are there a tool graphical to create a mirror voting disk and ocr please thanks
usn_work
nope, but the command line tools are great
mgolisch
can asm build a disk group over unequaly sized block devices?
ZaiS
 i think size of group will be smaller disk
« prev next »