皇冠hg0088代理网址

Questions tagged [sql]

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Issue getting while fetching data using joins

I have four table and structure as below : 1)Budget id Budget_name 1 test1 2 test2 3 test3 2)Yearly Budget id amount_yearly budgetid 1 1000 ...
-1
votes
2answers
13 views

How to show duplicated elements from different tables in SQL in one table

i'm currently learning sql and i have an issue. I have a table named teachers, another one named students and one named workers. All of those have a key called Power example: The tables look like this:...
0
votes
0answers
12 views

How to run SQL job on specific dates?

So I have a job that I would like to have run on the first friday of a fiscal calendar. In this case, the first friday of the fiscal calendar month does not always match up with the actual calendar ...
0
votes
0answers
10 views

Why is my “CREATE INDEX CONCURRENTLY ..” command blocked by a “SELECT FROM” query? (Postgres 9.6)

I was running a migration to create an index, but the migration was blocked by another query. I resolved the problem after discovering that there was another query blocking my migrations; and after ...
0
votes
0answers
12 views

How to sort relational tables using only 1 field in mysql [closed]

I have 2 relational tables and I joined them, and I want it to be sorted by the same field. Tables: posts fields: id, post, created reposts fields: id,post_id, created Here's what I currently have: ...
-2
votes
0answers
13 views

How to write a Java jdbc function that takes 2 tables from an SQL database A and B, then produces 1 table where rows are linked through other tables?

if(parsedValues.length!=3){ return ErrorManager.getErrorMessage(0); } newcommand = "select cr.*, c.* from " + parsedValues[1] + " cr join countryregioncurrency crc on cr....
0
votes
2answers
10 views

Not a Group By expression : Unclear on how to fix the issue

I am unsure of the main issue here and believe my code is correct but I do not know how to fix the issue provided being "ORA-00979: not a GROUP BY expression". SELECT distinct customer_city, ...
0
votes
1answer
18 views

How to get observation frequency counts from multiple dataset into one table?

I have a bunch of large datasets. DS_1 (contains all unique IDs and names): ID Name 1 Apple 2 Banana 3 Cherry DS_2: ID Observation 1 Apple detail 1 Apple detail 1 Apple detail 2 ...
0
votes
1answer
16 views

Limit specific part of active record query

Im having difficulty figuring out how to limit the correct part of my query results. Basically I am attempting to get all users that fit a criteria as well as the current user. My code for this is: @...
0
votes
0answers
25 views

Query returns duplicate values

The query below is showing some duplicate and wrong values: SELECT c.contest_id, c.hacker_id, c.name, SUM(s.total_submissions) as total_submissions, SUM(s.total_accepted_submissions) as ...
0
votes
1answer
15 views

SQL - Finding Percent Of a Total and subtracting to get two new totals

In my SQL course I'm trying to answer a problem in which i'm being asked to find X% of a Total then subtracting that result from the original total to produce another result. Then putting these ...
0
votes
0answers
15 views

Count Joins from Multiple Tables

For reference, I am using Postgres 9.2.23. I have several tables where one table (user_group) is related to some other tables (eg: posts, group_invites, and some more other ones). There is, also a ...
-1
votes
0answers
24 views

Is there a way to merge two tables to combine missing columns and remove duplicate records?

It is my first time using Access and I am struggling to combine two tables. I am working on patient referrals and for each patient, there's a referral date and a discharge date. I would like to ...
0
votes
0answers
15 views

Querying Temp table in RedShift

I have a table called packets in Redshift. I want to create a temp table called tmp_packet_size as part of the session and generate analytics. However, I am getting the output ResultSet returned ...
1
vote
1answer
28 views

Access database presenting date in ddmmmyyyy format

I have an Access DB where its date is given in ddMMMyyyy (ex: 27SEP2020). Each time I try and set the data type as a date, it deletes the entire column of over 450 entries. Is there a way to either ...

15 30 50 per page
1
2 3 4 5
37404