Skip to content

Joining two queries with different where clauses into 1 table

This is probably a pretty simple question, but I have two separate queries that I would like to join into one table. One of the queries shows sign ups to my website by month and the other query shows sign ups that have made a purchase. I would like to combine the two queries into one table so I have

Oracle UNION depending an IF conditon

I have to make a SQL query wraping all of theses statements: First, I have a first SQL query like this: Then, I have another SQL statement like this: Finally, based on the first SQL statement, I have to add a row of fake data on the result of the second statement if NbOfEntries > 0. I have to add

Add child note above node

Am trying to get from SQL to XML however have to format this correctly or it will not work. I am using C# to insert my sql between the QBXML This is what I get This is what I need ”’ ”’ I am not sure how to add the “CustomerAddRq” over each “CustomerAdd” Answer …

SQL select the latest record on joined tables

I want to retrieve the property which an user paid a tax last. have two tables person_properties and property_taxes What I tried so far: This gives me the person_id along the max year. But I actually need the property_id, the property which an user paid last. If I replace pp.person_id by pp.property_id, I the…

How to count two different columns in sql

I have a database which looks like this. My task is to get the columns of dates, number of exams on that date, number of students who write an exam on that date. Something like Date – Exam Count – Student Count. I have done this but in two different queries. Result: edate Exams | =================…