Showing posts with label player. Show all posts
Showing posts with label player. Show all posts

Monday, March 26, 2012

Help with simple SQL query

Hi All

Can anyone tell me what this simple SQL query would be:

Find all the words "black", "dvd" and "player" from any of the fields "Product", "Brand" or "Description".

Many thanks

accelerator

try something like this

select * from table where product like '%black%' or product like '%dvd%' or product like '%player%'

the above would search the product field...continue the same with your other fields.

|||Use ofFreeTextTable might be appropriate in this case. It's not the simple query you were looking for, but may provide more meaningful results.

Friday, March 9, 2012

Help with query

Hello I have query which is pulling the winnings for each player by month and year, I total the winnings but I would only like to see the top winner for each month.

Here is the query I have, any insight would be great thanks in advance.

SELECT TOP (100) PERCENT dbo.Players.Player_name, SUM(dbo.Event_data.Transaction_value) AS Winnings, DATEPART(year, dbo.Events.starttime) AS Year,
DATEPART(month, dbo.Events.starttime) AS Month
FROM dbo.Event_data INNER JOIN
dbo.Players ON dbo.Event_data.Player_id = dbo.Players.Player_id INNER JOIN
dbo.Events ON dbo.Event_data.Event_id = dbo.Events.id
GROUP BY dbo.Players.Player_name, dbo.Event_data.Transaction_type, DATEPART(year, dbo.Events.starttime), DATEPART(month, dbo.Events.starttime)
HAVING (dbo.Event_data.Transaction_type = 1)
ORDER BY Year, Month, Winnings DESC

Hi.

If you want to get the maximum value for each month, you must use the MAX function instead of SUM.

If you want the maximum for each month but, wants the total too, you can't see them in the same query because for getting the total you need to group the months too. May you coudl get the maximum for ecah month in the .net code:

Dim rw() As DataRow

rw = dataTable.Select("MAX(Winnings) AND Month = 1")

|||

Well first you could put this data you have in the above querry of the totals of all players per month in a table:

Table tempPlayerData

(

Player name,

PlayerScore,

Month etc...

)

then get the max from this temp table for each month.

|||

Sorry can you provide your answer using the query I provided.

thanks

|||

Sorry can you provide your answer using the query I provided.

thanks

|||

You want it in separate query or same query ?

So how will you want the result like below ?

[Player_Name] - [Winnings] - [Year] - [Month] - [Top Winner Name]

Note the [Top Winner Name] will be repeated for every record

|||

In the end I would like

Player name Winnings Month Year

george 24,000 1 2007

fred 12,000 2 2007

etc

only one record for each month

Monday, February 27, 2012

help with myspace

can anyone help me solve this problem.when i open up an artists myspace i cant get any music to play from the standalone player just get an error loading xml document.i have installed the latest flash player from adobe but still have the problem

hello. You may have installed a security update from microsoft that can create conflicts with myspace and other sites with flash content. I had the same problem and uninstalled an update and myspace content was working again. I am running win 2000 pro.

help with myspace

can anyone help me solve this problem.when i open up an artists myspace i cant get any music to play from the standalone player just get an error loading xml document.i have installed the latest flash player from adobe but still have the problem

hello. You may have installed a security update from microsoft that can create conflicts with myspace and other sites with flash content. I had the same problem and uninstalled an update and myspace content was working again. I am running win 2000 pro.

Friday, February 24, 2012

Help with Max Query

Hello I have query which is pulling the winnings for each player by month and year, I total the winnings but I would only like to see the top winner for each month.

Here is the query I have, any insight would be great thanks in advance.

SELECT TOP (100) PERCENT dbo.Players.Player_name, SUM(dbo.Event_data.Transaction_value) AS Winnings, DATEPART(year, dbo.Events.starttime) AS Year,
DATEPART(month, dbo.Events.starttime) AS Month
FROM dbo.Event_data INNER JOIN
dbo.Players ON dbo.Event_data.Player_id = dbo.Players.Player_id INNER JOIN
dbo.Events ON dbo.Event_data.Event_id = dbo.Events.id
GROUP BY dbo.Players.Player_name, dbo.Event_data.Transaction_type, DATEPART(year, dbo.Events.starttime), DATEPART(month, dbo.Events.starttime)
HAVING (dbo.Event_data.Transaction_type = 1)
ORDER BY Year, Month, Winnings DESC

Is this what you need?:

SELECT TOP (100) PERCENT dbo.Players.Player_name, MAX(dbo.Event_data.Transaction_value) AS Winnings, DATEPART(year, dbo.Events.starttime) AS Year,
DATEPART(month, dbo.Events.starttime) AS Month
FROM dbo.Event_data INNER JOIN
dbo.Players ON dbo.Event_data.Player_id = dbo.Players.Player_id INNER JOIN
dbo.Events ON dbo.Event_data.Event_id = dbo.Events.id
GROUP BY dbo.Players.Player_name, dbo.Event_data.Transaction_type, DATEPART(year, dbo.Events.starttime), DATEPART(month, dbo.Events.starttime)
HAVING (dbo.Event_data.Transaction_type = 1)
ORDER BY Year, Month, Winnings DESC

|||

Hi Mariop

no I need to sum the values first so I can get the monthly total of each player, then I want to select the highest monthly total for each month.