SQL query modification.

Peruttu Julkaistu 4 vuotta sitten Maksettu toimituksen yhteydessä
Peruttu Maksettu toimituksen yhteydessä

Hello,

Someone made me a query a while a go and now I need a little edit to it.

The data is send from my game an its send in this format:

Level_Started(Stage:0, Level:5)

Level_Ended(Stage:0, Level:5)

The game has multiple stages with multiple levels each stage:

Stage 0 has 5 levels

Stage 1 has 10 levels

Stage 2 has 10 and so on

In the current query It does not take in consideration the stages and counts up the starts of all levels 1 from all stages.

Here is the image of how it should return the data.

Here you have the current query in text:

SELECT

level,

MAX(Launched) Launched,

MAX(Retry) Retry,

MAX(Doned) Doned,

MAX(GameOver) GameOver,

MAX(Exit) Exit,

MAX(Restart) Restart,

FROM (

SELECT

event_params.value.int_value AS Level,

(CASE

WHEN event_name = 'Ball_Launch' THEN COUNT(event_params.value.int_value) END) AS Launched,

(CASE

WHEN event_name = 'Level_Retry' THEN COUNT(event_params.value.int_value) END) AS Retry,

(CASE

WHEN event_name = 'Level_Done' THEN COUNT(event_params.value.int_value) END) AS Doned,

(CASE

WHEN event_name = 'Level_Failed' THEN COUNT(event_params.value.int_value) END) AS GameOver,

(CASE

WHEN event_name = 'Stage_Exit' THEN COUNT(event_params.value.int_value) END) AS Exit,

(CASE

WHEN event_name = 'Stage_Retry' THEN COUNT(event_params.value.int_value) END) AS Restart

FROM

[analytics_181317890.events_20190402]

WHERE

[login to view URL] ="Level"

AND [login to view URL] ="2.0"

GROUP BY

Level,

event_name

HAVING

( COUNT(event_params.value.int_value) >=0 ) )

GROUP BY

level

ORDER BY

level

Data Analysis Data Analytics SQL

Projektin tunnus: #19298879

Tietoa projektista

15 ehdotusta Etäprojekti Aktiivinen 4 vuotta sitten

Myönnetty käyttäjälle:

databasedba

Dear Hiring Manager, I am an Oracle Certified Database Professional (OCP). I have complete masters in computer science. I am a database professional with 15 years’ experience. After carefully reviewing the experience Lisää

€23 EUR 1 päivässä
(0 Arvostelua)
0.0

15 freelanceria on tarjonnut keskimäärin €23 tähän työhön

softcarve

Hi, I would like to modify your query to include stage. Available for discussion and ready to start now. Looking Forward to your response. Regards, Manish

€20 EUR 1 päivässä
(62 arvostelua)
5.3
jayantavkumar

I am a database / Business Intelligence / solution architect. I have more than 14 years of experience in various technologies as mentioned below: Database - SQL Server, Oracle, MySQL Dotnet - C#, ASP.Net, MVC, Jav Lisää

€29 EUR 1 päivässä
(23 arvostelua)
4.8
Altantsetseg

Hi. From your project declaration, its the kind of task that I have been experienced well. I have been experienced in programming including SQL since 2000. During 2006-2013, I had been senior developer for Financi Lisää

€34 EUR 2 päivässä
(4 arvostelua)
4.3
ManzoorH

Hello I am a certified Database developer with over 7 years of experience in hand. i can help you on teamviwer and can explain you also what is the issue which will help you to manage this kind issue in future. Lisää

€15 EUR 1 päivässä
(6 arvostelua)
4.0
huseyinaygun

Dear Sir/Madam, I have relational database design and development experience of 10 years. Recently I completed 4 Database Systems Course projects which cover: - Conceptual design - Creation of database schema (creat Lisää

€26 EUR 1 päivässä
(6 arvostelua)
3.3
rjghule

Hi, I’m oracle certified SQL expert and have worked on many enterprises applications. I’m sure i can work on your query. Thank you!!

€26 EUR 1 päivässä
(1 arvostelu)
1.5
shnexxx

Hi, I have more than 8 years experience in database development, mainly SQL Server. I write SQL code daily and I am focused on database performance in general. If you give me the table structure I will modify the Lisää

€10 EUR 1 päivässä
(2 arvostelua)
1.5
khurram4225

Hey there, Hope you are doing well. We have gone through all the details of your project and after having necessary information to check our caliber, we have come to the result that we can make your project done succe Lisää

€30 EUR 0 päivässä
(0 arvostelua)
0.0
dilipd1994

Hi we have worked on more than 13 projects based on procedural level statements execution , we are innovative and creative we can do the quality work and share you in respected timeline provided

€16 EUR 3 päivässä
(0 arvostelua)
0.0
naHuka

Hello. I cann do it for u. Pm me for discuss the details. .

€8 EUR 2 päivässä
(0 arvostelua)
0.0
ashishthm

I understood your problem and what you require and I have the solution. let us have a chat for further discussion.

€29 EUR 3 päivässä
(0 arvostelua)
0.0