Skip to content
Advertisement

Tag: sql

How to split comma delimited data from one column into multiple rows

I’m trying to write a query that will have a column show a specific value depending on another comma delimited column. The codes are meant to denote Regular time/overtime/doubletime/ etc. and they come from the previously mentioned comma delimited column. In the original view, there are columns for each of the different hours accrued separately. For the purposes of this,

Cascading combo box

I am trying to bind 2 combo box, being the value of the second dependent from de first. All the solutions that i saw to this problem were by the use of Sql.Data (Datatable), which i cant use, due to the architecture of the application. I can do it 2 ways, by c# or through ASP Object Data Source. I’ve

What will be the output of the left join? [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 8 months ago. Improve this question I have 2 tables A and B. Table A has 3 rows and

Subqueries in MySQL

My first post here and I am desperate. Need this to complete the last 2 questions of my assignment. This is the code I wrote and it is outputting almost what I need. The problem in the assignment wants to display Employees or Guests that are from Winnipeg or London. My code gives me all the cities for each employee

Oracle SQL Select: getting duplicate results joining tables

I’m starting with SQL and doing some exercises and I’m completely stuck on the last one. It is about looking for streets in the same country name. Two tables are used, locations and countries from the HR schema. The problem is that I don’t know how to avoid duplicate results. For example if I have the street “x” in Canada

Access Bare Columns w/ Aggregate Function w/o adding to Group By

I have 2 tables in postgres. users auth0_id email 123-A a@a 123-B b@b 123-C c@c auth0_logs id date user_id client_name abc-1 021-10-16T00:18:41.381Z 123-A example_client abc-2 … 123-A example_client abc-3 … 123-B example_client abc-4 … 123-A example_client abc-5 … 123-B example_client abc-6 … 123-C example_client I am trying to get the last login information (a single row in the auth0_logs table

SQL relative percentage for each country

I have a table: maps_query like below: The question is to output the relative percentage of queries for maps_query for each country. Desired output is like below: I don’t quite understand what relative percentage is here but I assumed it’s asking to output (a country’s search_query counts/ all search_query for all countries)? Would something like the following work? Answer You

Advertisement