Skip to content

Tag: sql

Insert a line with different values

How to insert a line ? position the number 12 piece_color the R id 0 and 1 . I want to have two numbers here I did The returned error was: Answer You need to specify the columns to insert if you would like to use VALUES. In your case, it would be something like this:

HR SCHEMA: the year of most employees hires [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question IN the HR Schema in oracle how do I get the year in which the most employees were hired? Answe…

How to select all parents of a child from a table

I am using SQL Server. My table is called Employees. It looks like this: I am trying to build a query that returns all parents of the children So the query would return the parents of Bin and Sam are I tried this but wasn’t successful but this can only work for 1 parent How can I get the whole

Getting previous month data not working in sql server

I am trying to get the previous month data according to the datetime in the column dynamically for example I have data like this Now I want the records previous than Opendt. The problem is that I am getting the record after Opendt but I am getting empty when I am getting the record before 1 month or 2 month

union all two table instead of join

I have several table which I can not join them as it gets really complicated and bigquery is not able to process it. So I am trying to union all tables and then group by. I have an issue during this process. I have two tables called t1 and t2 with below headers, they don’t have null values: so in