SQL showing the results of two queries [closed] - sql

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 5 years ago.
Improve this question
I have two tables. Customers and Employees and I want a query that displays all customers and employees who live in California.
How would I go about doing that?

Take a look at the UNION https://www.w3schools.com/sql/sql_union.asp. Be aware that when SELECT-ing both have to have selected the same amount of columns.

Related

How can I write the number of active and passive people from the staff table using view [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 days ago.
Improve this question
How can I write the number of active and passive people from the staff table using view
I want to write to MsSql code.

Is it slower to select from another database [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 2 years ago.
Improve this question
If I am standing in database A and what to select from database B by using:
B.table.column
Is this going to slow things down compared to if the table was in databse A where I am standing?

How to know the number of user that register every day POSTGRESQL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I would like to know how many users register every day.
But i don't have any idea how to make that.
You can find below the table.
You use group by, assuming that "register" is defined by the created_at column:
select created_at::date, count(*) as num_created_users
from users
group by created_at::date;

Comparing Two SP's Performance SQL Server [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 5 years ago.
Improve this question
there is any simple way to know which one of two SQL Store procedure works better?
Click the Include Actual Execution Plan before running both sp (on the same run) and check the percentages

SQL Query - How to find a field with two or more same characters in it [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm using SQL Server DB and I would like to write query which will look for a fields with two or more slashes in it, lets say we have these rows:
1. abc/def/g
2. abcd/efg
3. a/b/c/d/e/f/g
So it should return 1st and 3rd row! What is the easiest way to do so?
Thanks in advance!