Structured Query Language (SQL) is a language for querying databases. Questions should include code examples, table structure, sample data, and a tag for the DBMS implementation (e.g. MySQL, PostgreSQL, Oracle, MS SQL Server, IBM DB2, etc.) being used. If your question relates solely to a specific DBMS (uses specific extensions/features), use that DBMS's tag instead. Answers to questions tagged with SQL should use ISO/IEC standard SQL.
i am inside pdb debugger in an application built with flask, python and sqlalchemy as ORM:
Assuming that we have the database:
Fields: name, age
instance one: John, 34
instance two: ...
I have few dataframes:
| | TYPE | SYMBOL | DESCRIPTION | OPOL | FIRST_INTEREST_DATE |
| 0 | BOND | 1 | FIRST | ...
Say We have 2 tables:
Table1: userid VARCHAR, segments ARRAY
Table2: userid VARCHAR, gpid VARCHAR
Now I want find all the gpids based on input segments and put them in another table with their ...
I am trying to perform an inner join on two tables by date and county ID. Whenever I run the query, I get the following error:
SQL Compilation Error: syntax error line 1 at position 0 unexpected '...
I'm trying to figure out how to store configurable a log in a database. The main issue is that the user would like to be able to update what data is being captured.
Here's an example for what I'm ...
I'm facing an issue where I have a java application running on a server, and it starts growing in memory until eventually the server cannot handle it anymore.
This is some sort of memory leak / ...
I have a LocalTexts table:
id(pk, autoincrement) code | lang | name
1 1 ln Aquastors
2 1 en Question
Also the table RateClassificator:...
Write a query to display 10 days after today’s date in the following format: January 29, 2022
Hint: Use DUAL table. No actual database table is needed.
So I designed a Bank database in MySQL, and now I want to convert some syntax to PostgreSQL
this is my account and branch table :
CREATE TABLE `account` (
`accountnumber` int(80) NOT NULL,
Table name: products,
column names: rice_price, sugar_price
I would like to get the average of both columns separately. For example;
I need to select between a range of dates centered on a specific date, but my partition column of dates is stored as int.
For example, selecting between the dates before and after '20210901' (20210831 ...
I have the following table:
ID PatientID bpm accelerometer ... issue received
These are wearable sensor data that I receive every 3 ...
Suppose we have a table.
Product_Id Col_1 Col_2
1 a c
2 i b
3 i b
4 i b
5 d b
6 i b
7 b a
8 e f
9 b g
10 c a
11 c a
12 h d
13 x z
Now I want to ...
I want to use SQL to left join two tables but only where the common column fits a substring criteria. How can this be accomplished?
CREATE TABLE MY_JOIN AS
SELECT A.*, B.*
FROM DATA.TABLE_B AS B