Skip to main content

All Questions

Tagged with
1 vote
1 answer
22 views

SQL Group By Then Filter [duplicate]

I have two tables as follows: Table A : contacts Contact_Primary_Num Displayed_Name 1 Smith, Joe 2 Doe, Donna 3 Jerry, Tom 4 Crocker, Betty Table B : contact_notes Contact_Note_Primary_Num ...
Progolfer79's user avatar
-2 votes
0 answers
30 views

How to changing checkbox in table only for filtered position Access [closed]

I have an Access database where I have a lot of checkboxes in Table, I need to change the data to yes/no only for filtered items what better way to do it? via VBA or Query I made a query but it ...
Dima Halaida's user avatar
0 votes
2 answers
49 views

SQL not finding a column and cant use a condition to filter data [duplicate]

i'm currently a student and while doing an SQL excercise i had a question and i tried to do a thing. So this is the main query SELECT Date, Region, Total_Bags, Small_Bags, (...
Mizu Chan's user avatar
0 votes
1 answer
79 views

How to use "LIKE" in Pyspark SQL expression statement

I would like to create a filter with SQL expression statement that will help me to exclude rows from PySaprk dataframe, where column "file_path" fits the pattern "c:\part1\part2\part3\*&...
Lost in ML's user avatar
0 votes
1 answer
41 views

How to filter out orders with zero dollars in sales in SQL?

I'm trying to filter out orders that have $0 in sales but I'm somewhat new to writing SQL code so I'm not exactly sure how I would go about writing this. I'm more familiar with writing DAX, which in ...
Steve Buscemi's user avatar
0 votes
1 answer
54 views

How to compare IP address (whose column datatype is ARRAY of String) for a particular range in PostgreSQL

In PostgreSQL, I have a column named as 'IP' whose Datatype is Array. I want to filter the records where IP are between the particular range. I tried below queries but throwing error in postgresql. ...
Hemavathy A's user avatar
-1 votes
2 answers
59 views

Indicate whether a date is < 6 months before another date for the same ID column in SQL

I have something like this: Id Visit_Date Visit_code A30 15May2004 Surgery A30 05FEB2005 Office B01 07DEC2002 Office ...
alex's user avatar
  • 844
0 votes
0 answers
24 views

Similar filters behave differently

We have 2 versions of a table: V1 and V2, V1 being the source of truth. I am in the process of comparing both these versions and trying to make V2 a mirror copy of V1 (there is no possibility of ...
Kirti Singh's user avatar
-1 votes
3 answers
59 views

Filter row based in same id in T-SQL

I have this table and I need to filter some rows. If the same number has line with Account = Tax and Account = Pay, I have to exclude these two rows. For example, the number 1 has one row with tax and ...
FelipeH's user avatar
1 vote
2 answers
62 views

DB structure/file formats to persist a 100TB table and support efficient data skipping with predicates in Spark SQL

I'm optimizing a Spark SQL ETL to frequently select 0.1% of data from a 100 billion rows, 100TB parquet formatted table 'event_100B' on S3. Table event_100B contains a unique key column EventId (32 ...
Michael Shan's user avatar
0 votes
1 answer
42 views

Is there an easy way to select all referencing records of a 3rd or 4th relation where at least one of them (IN operator) matches?

A code snippet will be the best example of what I'm trying to accomplish: SELECT A.*, B.*, C.* D.* FROM tableA A JOIN tableB B ON A.id = B.a_id JOIN tableC C ON B.id = C.b_id JOIN ...
Henry's user avatar
  • 520
0 votes
1 answer
35 views

How can I include all the other fields of table when I'm filtering the data by only 1 field using group by hand having?

So this my query below: select creditcard from user where preferred_card = '1' and uder_identification_code = 'creditcard' group by creditcard having count (1) > 1; So I'm trying to get list of ...
Yuan's user avatar
  • 5
0 votes
0 answers
44 views

Node.js Sequelize combine count in filter

I am working on a Node.JS project with Sequelize. I have a service that receives multiple filters from the frontend and it combines these filters in order to answer. I have Document, Email_Logs ...
nargyriou's user avatar
0 votes
0 answers
92 views

Parameter as filter in Redash

I have this script SELECT SUM(gppn."wonAmount") AS "ss" FROM "GrantParticipant" AS gp LEFT JOIN "GrantParticipantProjectNomination" AS gppn ON gp....
ushakovi's user avatar
0 votes
1 answer
43 views

SQL - Filter by CONSTRAINT_TYPE

I need the following query to only return columns with a UNIQUE constraint: SELECT col.owner as schema_name, col.table_name, column_name, data_type, data_precision FROM sys....
Achiral's user avatar
  • 57

15 30 50 per page
1
2 3 4 5
44