This is what I have so far, and it is pulling every single check for that Id. I need the latest checkdt for each Id. What am I missing? SELECT e.Id ,e.EmployeeNumber ,e.LastName ,e….
SQL Teradata – Comparing row values but skipping some rows
Lets say I have these date values in my table: #1 2019-01-01 #2 2019-02-01 #3 2019-03-01 #4 2019-05-01 #5 2019-06-01 #6 2019-06-15 #7 2019-07-01 I need to keep only the dates that are 2 months …
GROUP BY all columns except two date fields and manipulate the date fields in query
I have a query that returns a bunch of columns including two date fields: START_DATE and END_DATE. I need to modify the query so that if all fields other than the dates are equal the rows are combined …
How to pass a Variable/Function into SQL Query?
I am attempting to Insert a Row on a Table, but I cannot seem to pass the TASK_ID as a value/variable/function into the SQL Statement. Throughout the application, to acquire TASK_ID, I use: Dim …
Updating the Fields in the JSON_ARRAY Mysql 8.0
Here is my scenario, I want to update the hourly_rate for the BOB to 600. How to extract the hourly_rate from the json_array mentioned below for the specific user BOB. @data = [{ “Subject”: “Maths”, …
how to fetch top 9 and others based on count(entity_id) sorted highest top 9 and then club the other count into ‘others’ category
The following query executes everything: SELECT count(entity_id), cim.institute_id, cfi.name_ FROM ci_certification_students cis INNER JOIN ci_certification_master cim ON cis.certificate_id = cim….
How would i use a wildcard for a specific string in SQL
I have a string which I need to select in a CASE statement: LLF_RET_mob However, when I use the following string in my LIKE statement in SQL it returns null: %LLF\_RET_\_mob% What would be …
How to query Json array in jsonb in Postgresql
I have a jsonb column which have following rows ROW1: [ { “cpe23Uri”: “cpe:2.3:a:sgi:irix:3.55:*:*:*:*:*:*:*”, “active”: true }, { “…
Is count() being used correctly for my query?
Find all teams that only won 1 game in tourney #3 (1 column, 4 rows) My thought process to create this query is that I need to count (WonGame)s for each Team. And that that number cannot be has to …
How to use MS Access form dropdown menu to upload data to SQL Server cell
I’m going to keep this simple as possible, I have a ticket system I’m trying to create in MS Access. I have a dropdown menu that has three options “Open, Assigned, Closed” I have three rows in a …