SQL Query Help - Urgent

I wanted help in writing a query for the above relationship

  1. Please write one SQL SELECT query for each of the following results:

a) The number of clicks and registrations per day in 2020

b) The number of clicks and registrations per click day in 2020

what have you tried? This looks like homework, so not sure why it's labelled as urgent. Please provide DDL, sample data and expected results and we can help. No one is going to take the time to generate it for you and we'd only be guessing anyway.

3 Likes

I hope this will help you.

I have only basics of SQL and this is a bit advanced for me. So it would be really helpful if you could guide me.

The expected output is mentioned above dont know what you mean by expected output

you want me to write the SQL for you ?

OR

you want to take my help and understand and do it ?

either way is fine with me

if you understand data how it is stored ? what is SQL ? how SQL is written to retrieve data etc etc etc
it becomes very easy

some other things like Cognition , Memorization , Practice etc etc are there
those are common for everybody
those are different types of understanding .. which will make it much much much quicker

is this home work? a job interview? a test? in either case, us helping you without you having provided anything you have attempted to do would be a disservice to other students that might taking this test/homework and to other job seekers also vying for this job. But this is all assumptions as you have not told us what these questions are for..

1 Like

Question 1.a. looks like it might require a Full Outer Join between the Users table and the Informations table (what a horrible name that is for a table) based on the respective timestamp columns. It doesn't say whether or not the timestamps have a time in them so I would assume they do and you should convert them to just the day to compare them.

Question 1.b. looks like it'll use the same two tables but with an Outer Join only to the Informations table.

Knowing that, give it a try. I don't know in the write-up what they mean when they say "Tasks 1b and 3b also require further written explanations". I'm thinking that they want you to explain how the queries you write actually work and why you made it work that way.

Now, just so you know, there are a whole lot of reasons why we're all hesitant to help you with actual code...

  1. If this IS for an interview, we don't want to help you get the job because the company would suffer from your lack of knowledge.
  2. If we've misunderstood the question and give you the wrong answer, we don't want to be blamed for trying to help and getting it wrong.
  3. You NEED to TRY first! You done nothing to show us any motivation on your part. So, give it a try. I even gave you some hints as to what to look for.
  4. All the reasons also apply to homework.
2 Likes