Click here to Skip to main content
15,888,454 members
Home / Discussions / Database
   

Database

 
GeneralRe: Question about Oracle tools Pin
Keith Vitali5-May-04 8:59
Keith Vitali5-May-04 8:59 
GeneralRe: Question about Oracle tools Pin
Chris Meech5-May-04 9:30
Chris Meech5-May-04 9:30 
GeneralRe: Question about Oracle tools Pin
Keith Vitali5-May-04 10:11
Keith Vitali5-May-04 10:11 
GeneralMax and Where Pin
OmegaSupreme5-May-04 1:28
OmegaSupreme5-May-04 1:28 
GeneralRe: Max and Where Pin
Mike Dimmick5-May-04 1:54
Mike Dimmick5-May-04 1:54 
GeneralRe: Max and Where Pin
WoutL5-May-04 1:57
WoutL5-May-04 1:57 
GeneralRe: Max and Where Pin
OmegaSupreme5-May-04 3:28
OmegaSupreme5-May-04 3:28 
GeneralRe: Max and Where Pin
WoutL5-May-04 3:50
WoutL5-May-04 3:50 
Try:

<br />
SELECT DISTINCT <br />
Ad.pkAdId, Ad.fileName, Ad.name, Ad.length, Ad.lastUpdated,<br />
MAX(BookingDate.bookingDate) AS MaxDate,<br />
MIN(BookingDate.bookingDate) AS MinDate,<br />
AVG(BookingHour.bookedSlots + BookingHour.bonusSlots) AS AverageSlots<br />
FROM Ad <br />
INNER JOIN Booking ON Ad.pkAdId = Booking.fkAdId <br />
INNER JOIN BookingDate ON Booking.pkBookingId = BookingDate.fkBookingId<br />
INNER JOIN BookingHour ON BookingDate.pkBookingDateId = BookingHour.fkBookingDateId<br />
WHERE  (Booking.fkChannelId = @channelId)<br />
GROUP BY Ad.pkAdId, Ad.fileName, Ad.name, Ad.length, Ad.lastUpdated<br />
Having MinDate >= @startDate)<br />
AND MaxDate <= @endDate)<br />
ORDER BY Ad.fileName<br />


Wout Louwers
GeneralRe: Max and Where Pin
OmegaSupreme5-May-04 4:00
OmegaSupreme5-May-04 4:00 
GeneralRe: Max and Where Pin
WoutL5-May-04 4:06
WoutL5-May-04 4:06 
GeneralRe: Max and Where Pin
OmegaSupreme5-May-04 4:39
OmegaSupreme5-May-04 4:39 
GeneralMore on DataSets Pin
normanordas4-May-04 23:50
normanordas4-May-04 23:50 
GeneralRe: More on DataSets Pin
Mike Dimmick5-May-04 1:57
Mike Dimmick5-May-04 1:57 
GeneralMSDE Usage Pin
Roger Wright4-May-04 18:45
professionalRoger Wright4-May-04 18:45 
GeneralRe: MSDE Usage Pin
Maxwell Chen4-May-04 18:59
Maxwell Chen4-May-04 18:59 
GeneralRe: MSDE Usage Pin
normanordas4-May-04 23:59
normanordas4-May-04 23:59 
GeneralComparing two tables using C#, ADO.NET Pin
Brett Slaski4-May-04 8:24
Brett Slaski4-May-04 8:24 
GeneralCrystal Reports Pin
Mr. Cully4-May-04 1:09
Mr. Cully4-May-04 1:09 
GeneralRe: Crystal Reports Pin
Mr. Cully4-May-04 5:09
Mr. Cully4-May-04 5:09 
Generaldetach database Pin
Dpriya3-May-04 23:58
Dpriya3-May-04 23:58 
GeneralRe: detach database Pin
Mazdak4-May-04 5:38
Mazdak4-May-04 5:38 
QuestionHow I access database through a Map Network drive? Pin
ATC3-May-04 8:13
ATC3-May-04 8:13 
AnswerRe: How I access database through a Map Network drive? Pin
Mike Ellison4-May-04 8:31
Mike Ellison4-May-04 8:31 
Questionhow to put an image in sql database Pin
Member 7402202-May-04 11:15
Member 7402202-May-04 11:15 
AnswerRe: how to put an image in sql database Pin
Mazdak2-May-04 21:22
Mazdak2-May-04 21:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.