Click here to Skip to main content
15,670,442 members

Comments by kmoorevs (Top 19 by date)

kmoorevs 12-May-23 8:45am View    
Hello, can you provide some feedback? Did any of these solutions work for you?
kmoorevs 5-May-23 16:07pm View    
Have a look at my revised answer above. It seems to match the results you are looking for.
kmoorevs 2-May-23 9:57am View    
You are absolutely right! I misread the title/question.

Still, I think parts of this solution may be useful. I will give this another try later today as time permits.
kmoorevs 29-May-21 13:24pm View    
You should have read somewhere that sql top requires an order by clause. You don't mention which dbms this is against, but not all (such as mysql which uses a the limit keyword instead) will use the same syntax. Also it's not clear that you understand the use of parameters. It appears that you are trying to insert a variable where a parameter is expected. Either assign the variable to a parameter or better yet, simply concatenate the variable into the query...you don't even need to convert it to an int doing it that way.
kmoorevs 10-Nov-18 16:50pm View    
Sorry, I misread your queries originally. I was thrown off by the extra ) at the end of the outer query. It's not clear what you are trying to get as results. Top sales person per product type? (what about product type 555?)