|
hi here I am using SQL SErver 2005 with following query.....
select distinct dbo.AE_Site.siteId as siteId,dbo.AE_Site.siteName as
siteName,dbo.AE_Dimension.Impression as Impression from
AE_Dimension inner join AE_Channel on dbo.AE_Dimension.channelId=dbo.AE_Channel.channelId
inner join AE_Site on dbo.AE_Channel.siteId=dbo.AE_Site.siteId where dbo.AE_Dimension.cpm='0.5$'
output is
siteId siteName Impression
301 msn india 10
301 msn india 15
336 Yahoo India 45645
but I want output like
siteId siteName Impression
301 msn india 25
336 Yahoo India 45645
anybody plz reply me ASAP....
Thanks
Rajendran.AL
|
|
|
|
|
select distinct dbo.AE_Site.siteId as siteId,dbo.AE_Site.siteName as <br />
siteName,(select sum(dbo.AE_Dimension.Impression) from dbo.AE_Dimension where dbo.AE_Dimension.chanelID in (select dbo.AE_Channel.channelId from AE_Channel)) where <br />
dbo.AE_Channel.siteId in (select dbo.AE_Channel.siteID from AE_Channel) and dbo.AE_Dimension.cpm='0.5$'
hope it helps to you...
I Love T-SQL
|
|
|
|
|
Try:
select S.siteId, S.siteName, sum(D.Impression) as Impression
from dbo.AE_Dimension as D
inner join dbo.AE_Channel as C
on D.channelId = C.channelId
inner join dbo.AE_Site as S
on C.siteId = S.siteId
where D.cpm = '0.5$'
group by S.siteId, S.siteName Note that using table-aliases (e.g. "D" instead of "dbo.AE_Dimension") makes it more readable.
|
|
|
|
|
Use group by siteId ...
N.Rajakumar B.E.,
|
|
|
|
|
hello everyone , iam sorry for being far from this forum from along time but it is out of my hands . ok !
now there is a problem or a difficulty for me to completely design this database , using this case study
"we have 50 materials available for students to study.
each term , every student has the ability to sign only 3 materials only of his choice from the above 50 materials , suppose that this student failed in one of them so the next term will only sign two with the material he failed in so the total is also 3 materials in each term , and there are some materials if he failed in them render him from taking some other materials which are related to the materials he failed in , explain further .
suppose that student failed in material B and material G is built in knowledge upon material B thus he can't choose material G except if he succeeded in B first .
so i am suppose to design this database for student result examination i don't know really how the database could be designed ???
any help please .
Human knowledge belongs to the world.
|
|
|
|
|
You already posted this. It must be obvious nobody is going to do your homework for you. Have a try, and post any REAL problems and you will be helped.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
can you help me
Human knowledge belongs to the world.
|
|
|
|
|
You were advised to give a try and revert back in case of hurdles that you encounter in the process. You may not use a discussion forum as a substitute for your self-initiated homework. That is not going to work.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
pay me and I will desing database for you
I Love T-SQL
|
|
|
|
|
you mean design not desing . thanks
Human knowledge belongs to the world.
|
|
|
|
|
Yes you got it.
I Love T-SQL
|
|
|
|
|
when you know how to write english first , try to talk to me
ok , i am a newbie in database design and that is not a problem
i have too much working on from programming with more than five languages varies from desktop to web and security i didn't give out
studying database but i am newbie ,i begun studying sql and this is
really a homework not a company task . i will perform it but i needed
some ideas , that is all
Human knowledge belongs to the world.
|
|
|
|
|
I would like to help you but I will do it when I gonna learn better english language.
And no-one asked about your experience on programming...;P
I Love T-SQL
|
|
|
|
|
snouto wrote: when you know how to write english first , try to talk to me
You ought to begin learning the good way of communicating in a public discussion forum first. Then you can venture into streamlining your lexical language skills.
Once you have a comfortable position in the above two, you would be eligible to dream about being a programmer. Till then, bid adieu to your career in programming and choose a better alternative.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Listen all of you , that is enough ok , i didn't begin talking rudely except after they forced me to , second, i am a professional programmer ok but not a database designer and above all i am a doctor i do programming for fun , i don't know what is the problem in my post for asking about ideas in designing this database ?????
why you are attacking me from the beginning ???????????
why you are attacking me from the beginning ???????????
why you are attacking me from the beginning ???????????
why you are attacking me from the beginning ???????????
i don't know why ???????? ,
Human knowledge belongs to the world.
|
|
|
|
|
Your first post doesn't have a sense because you want to design databse and you asked here without trying to design at least one table by yourself.
How come to design a database for you someone else, I won't do it for you.
If you wanna have a help from here then try to give us specific problem not general.
And no-one attacked you but your first question sounds so bad.
I Love T-SQL
|
|
|
|
|
listen mr blue_boy , all the problem is that the database is dynamic
in the sense that the students will have to sign for specific materials from about 40 materials and i have to track that
the whole problem facing me is that :
how to track students with their materials they chosen from these 40 materials with their results ???? the problem is that
this type of education is open for any one to choose 3 materials in one semster not like the normal scenario in which every semster has its own well known materials to undertake ?????? did you understand me ?????
Human knowledge belongs to the world.
|
|
|
|
|
I will give a look later your question because now I am leaving.
I Love T-SQL
|
|
|
|
|
snouto wrote: second, i am a professional programmer ok but not a database designer
This kind of conflicts with this:
snouto wrote: and above all i am a doctor i do programming for fun
So are you a professional coder? In fact, a quick look at your Codeproject biography says it all:
Biography: Iam Medical student but . Programming is my hobby and i like programming cause i feel fun when i work in front of a compiler . Iam C# and java Developer especially network and database programming && professional robotic Designer.
In other words, you claim to be something you are clearly not.
In answer to your response to my first post, snouto wrote: can you help me
the answer is yes, I can, as this is the sort of thing I do for a living. However, this is not a 'find a freelancer' site, it is for people who have tried to write some code/design a database etc and are having problems. I have read your later posts, and while I have a certain amount of sympathy you are unlikley to get a professional programmer/database designer to do work for free - its like everything else in the real world, you get what you pay for.
Bob
Ashfield Consultants Ltd
modified on Monday, April 28, 2008 2:58 AM
|
|
|
|
|
Bob or ashfield , do you know that getting my biography and
know information like that about something to get what you want is called
in computer security "reconnaissance" and it is the first step in penetration testing as gathering information , i am astonished by this step you undertaken , but all i wanted to say
about my biography i wrote it when i was in the university , i am really a professional C# / Java developer and moderate in electronics and neural networks that is why i wrote robotic designer ( i designed some robot models )with neural networks but i never went to commercial places , when i wrote database designer , yes i wanted to be a database designer but the time didn't serve me to begin to study databases , but these days i can .
when i posted this post all i wanted to have is some new ideas for me or help for me to begin designing the database , i didn't want a full .mdf file for the database , i think you understood me wrong .
and above all i do all of that for fun i don't work in a software company , that is why i told you i do programming for fun because i really do it for fun , my interest these days is security and electronics .
Thanks bob , by the way i have looked at your web site i think you have to be a professional web designer because your web site looks ugly , try to change it , if you want me to do it , i can do it for you without money just for FUN .
Thanks
Human knowledge belongs to the world.
|
|
|
|
|
snouto wrote: Thanks bob , by the way i have looked at your web site i think you have to be a professional web designer because your web site looks ugly , try to change it , if you want me to do it , i can do it for you without money just for FUN .
You don't have reason to be silly...
I Love T-SQL
|
|
|
|
|
i am , is there any problem ??? guys !!!!
Human knowledge belongs to the world.
|
|
|
|
|
Yes, the silly persons can't post here any request for help, so STOP posting.
I Love T-SQL
|
|
|
|
|
i am sorry , i can't reply to your insults , my tongue can't say these words , i think you need first to learn manners before being a developer. I will complain to the web site administration about your insult , because we are a community of well mannered developers .
Thanks
Human knowledge belongs to the world.
|
|
|
|
|