Results for sql-server
I have a main table that contains the data I have, and a reference table telling me what values the main table should have. I want to check if the mai...
DECLARE orderid NUMBER; customerid NUMBER; channel VARCHAR2(20); amount NUMBER; CURSOR orders_cursor IS SELECT order_id, cu...
In PostgreSQL I have: SELECT * FROM weather_data WHERE parameter_type = 'TEMPERATURE'; I want to write this as: WITH ParameterType AS (VALUES ('TEMPER...
COUNTRY STORE_ID ORDER_DATE DE 990003975 2023-01-24 FR 990004963 2023-04-11 FR 990005204 2023-06-15 FR 990005204 2023-06-10 FR 9900052...
SQL Gurus, I have got a problem and I have no idea how to solve it. I have a table like this in BigQuery: id ga_id first_date second_...
I want to create a query in oracle that looks like this DECLARE my_count NUMBER; BEGIN SELECT COUNT(table.column1) INTO my_count FROM table; I...
I am trying to create a column that represents how many days ago the most recent promotion started for each product. It should continue counting on wh...
SELECT a.year, a.country, b.amount FROM table_a a LEFT JOIN table_b b ON a.country=b.country AND (CASE WHEN b.country = 'Europe' THEN b.year = 2022 EL...
SQL beginner here. So I have this so far when trying to find the total time traveled based on the "generation" column: SELECT generation, SUM(...
So I have this so far when trying to find the total time traveled based on the "generation" column: SELECT generation, SUM(CASE WHEN generatio...
I have a table TABLE_A Which has all the column as CHARACTER DATATYPE. Let's say in one of the column I have the value like : Column_A 123 1,123 I ha...
Suppose we have a table listing orders, among others one column lists the customer who bought a product, another column lists the specific product he/...
I have a list of products, each product has different types of discounts, I need to query during products to get products that have specific prices (a...
Sort of new to PHP (8.1) & SQL (Myqli) and seriously stuck on this one. Would very much appreciate some help here. SQL Tables are as follows: $current...
Here is my situation, I have a table with these columns: FormID AbilityGenID Ability1ID Ability2ID HiddenID To search for certain records I have a q...
I have a DB with two tables: employees table: fields = {ID, name} turnShift table: fields = {ID, date, ID_employee1, ID_employee2} Here is an exampl...
In Snowflake SQL, I am trying to achieve a scenario to create array aggreagate of dates based on certain where conditions, but I am not able to achiev...
I run a query in athena like so: SELECT element_at(col_name,1).entities FROM "db_name"."the_table" limit 10; and I get an array of nested jsons/dicts ...
I have a database table with this data: PurchaseDate = Classification = Quantity = I need to create report on how many Quantity per day, per Classi...
I have three tables 1.) Students (id,firstName,Surname,email) 2.) Course_Student(student_id, course_id) 3.) Courses (id, name, classroom_id) I need to...
I have a product table and reviews table and want to show the products with the avg ratings SELECT p.*, avg(r.rating) as avg_rating FROM product p ...
I have these tables CREATE TABLE poster ( poster_id SERIAL NOT NULL PRIMARY KEY, country VARCHAR ( 50 ) NOT NULL ); CREATE TABLE batch ( ...
I have these tables CREATE TABLE poster ( poster_id SERIAL NOT NULL PRIMARY KEY, country VARCHAR ( 50 ) NOT NULL ); CREATE TABLE batch ( batch...
I have a query which returns result, contains dates mixed with null values. My goal is to remove nulls from all columns by merging values. Note: it's ...
Assume we have the following People table: Name | Id | Employee type ------------------------------- Max | 2 | Engineer Alice | 3 | Scient...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?