SQL query modification.

Dibatalkan Dipasang 4 tahun yang lalu Dibayar saat pengiriman
Dibatalkan Dibayar saat pengiriman

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

ID Proyek: #19298879

Tentang proyek

15 proposal Proyek online Aktif 4 tahun yang lalu

Diberikan kepada:

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 Lebih banyak

€23 EUR dalam 1 hari
(0 Ulasan)
0.0

15 freelancer rata-rata menawar €23 untuk pekerjaan ini

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 dalam 1 hari
(62 Ulasan)
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 Lebih banyak

€29 EUR dalam 1 hari
(23 Ulasan)
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 Lebih banyak

€34 EUR dalam 2 hari
(4 Ulasan)
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. Lebih banyak

€15 EUR dalam 1 hari
(6 Ulasan)
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 Lebih banyak

€26 EUR dalam 1 hari
(6 Ulasan)
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 dalam 1 hari
(1 Ulasan)
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 Lebih banyak

€10 EUR dalam 1 hari
(2 Ulasan)
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 Lebih banyak

€30 EUR dalam 0 hari
(0 Ulasan)
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 dalam 3 hari
(0 Ulasan)
0.0
naHuka

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

€8 EUR dalam 2 hari
(0 Ulasan)
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 dalam 3 hari
(0 Ulasan)
0.0