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

Database

 
AnswerRe: How SQL command queury the first character of a Name column from a MS Access database? Pin
David Mujica9-Mar-10 5:47
David Mujica9-Mar-10 5:47 
GeneralRe: How SQL command queury the first character of a Name column from a MS Access database? Pin
Curious 20099-Mar-10 6:38
Curious 20099-Mar-10 6:38 
Questionsql select/grouping question Pin
djhankypark9-Mar-10 1:04
djhankypark9-Mar-10 1:04 
AnswerRe: sql select/grouping question [modified] Pin
Wayne Gaylard9-Mar-10 1:42
professionalWayne Gaylard9-Mar-10 1:42 
GeneralRe: sql select/grouping question Pin
djhankypark9-Mar-10 7:32
djhankypark9-Mar-10 7:32 
AnswerRe: sql select/grouping question Pin
Corporal Agarn9-Mar-10 6:07
professionalCorporal Agarn9-Mar-10 6:07 
GeneralRe: sql select/grouping question Pin
Corporal Agarn9-Mar-10 8:05
professionalCorporal Agarn9-Mar-10 8:05 
GeneralRe: sql select/grouping question Pin
djhankypark26-Mar-10 23:50
djhankypark26-Mar-10 23:50 
Sorry so long with this reply I also get pressed with work time unfortunately.

I tried the suggested query and have now got it running fine, for this I thank you, however I do have a small issue and can't seem to find the answer to it.

If 2 songs exist with the same name

i.e.

"only you" by the flying pickets which has 47 plays
"only you" by the platters which has 14 plays

It will show both even though 14 plays does not fit with the top 5 most played

I slightly altered you code to fit my needs as follows...

SELECT top 5 A.artist, A.title, A.count_played, B.MaxDate FROM dbo.songlist A INNER JOIN (SELECT count_played, MAX(date_title_played) AS MaxDate
FROM dbo.songlist GROUP BY count_played ) AS B ON A.date_title_played = B.MaxDate
WHERE B.count_played >0
ORDER BY B.count_played DESC, date_title_played DESC


Any ideas ?

Thanks in advance
GeneralRe: sql select/grouping question Pin
Corporal Agarn29-Mar-10 0:43
professionalCorporal Agarn29-Mar-10 0:43 
QuestionUpdate a date/time field through VB. net Pin
Johnkokk8-Mar-10 23:57
Johnkokk8-Mar-10 23:57 
AnswerRe: Update a date/time field through VB. net Pin
Johnkokk9-Mar-10 0:11
Johnkokk9-Mar-10 0:11 
QuestionHelp with access query Pin
sarang_k8-Mar-10 18:18
sarang_k8-Mar-10 18:18 
AnswerRe: Help with access query Pin
Mycroft Holmes8-Mar-10 18:53
professionalMycroft Holmes8-Mar-10 18:53 
GeneralRe: Help with access query Pin
_Damian S_8-Mar-10 18:55
professional_Damian S_8-Mar-10 18:55 
AnswerRe: Help with access query Pin
_Damian S_8-Mar-10 18:54
professional_Damian S_8-Mar-10 18:54 
AnswerRe: Help with access query Pin
riced8-Mar-10 22:43
riced8-Mar-10 22:43 
QuestionCreating multiple sql stored procedures from vb .net Pin
iramirezp8-Mar-10 5:54
iramirezp8-Mar-10 5:54 
AnswerRe: Creating multiple sql stored procedures from vb .net Pin
Not Active8-Mar-10 6:19
mentorNot Active8-Mar-10 6:19 
GeneralRe: Creating multiple sql stored procedures from vb .net Pin
iramirezp8-Mar-10 6:50
iramirezp8-Mar-10 6:50 
AnswerRe: Creating multiple sql stored procedures from vb .net Pin
RCoate8-Mar-10 13:28
RCoate8-Mar-10 13:28 
GeneralRe: Creating multiple sql stored procedures from vb .net Pin
iramirezp9-Mar-10 7:50
iramirezp9-Mar-10 7:50 
QuestionHelp with access Query Pin
Gali19788-Mar-10 0:40
Gali19788-Mar-10 0:40 
AnswerRe: Help with access Query Pin
Chris Meech8-Mar-10 4:25
Chris Meech8-Mar-10 4:25 
GeneralRe: Help with access Query Pin
masoumeh20108-Mar-10 8:28
masoumeh20108-Mar-10 8:28 
GeneralRe: Help with access Query Pin
Chris Meech8-Mar-10 8:46
Chris Meech8-Mar-10 8:46 

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.