I need to select from the table competition_rounds the latest added records which are linked to the competition_seasons table with the season_id column, eg: competition_rounds competition_seasons I want return only: the problem’s that my query return all rounds available: NB: The table competition simpl…
Postgres get root of self-referential table
Given the table: If I get a name from the table (and thus the Pkey), how can I get the name of it’s “root”-level parent: the name where parent is NULL which is referenced to (indirectly) by the given name. Say I have these values (I don’t know which values I will get): The function/wha…
Extract user journey data between two pages in BigQuery Google Analytics data
How to extract users’ journey data between two specific pages in Google Analytics BigQuery Export data? Example: Website has 100 pages: hits.page.pagePath=/page_1 to hits.page.pagePath=/page_100. Goal is to extract user journey data from /page_13 to /page_22, including all in-between pages. The challeng…
SAS IOM Data Provider – Access Denied – SSIS connection [closed]
I’m looking for guidance into how to integrate with the SAS IOM Data Provider through SSIS. It works fine when using SAS software but when trying to connect using the SAS IOM Data Provider in SSIS I …
This procedure is inserting null values into my custom table – why?
Table output is like this when I pass acad_prog ‘BTRCS’ and admit_term ‘1701’ as input in procedure: Answer You need to use cursor values in if statement and in insert statement like this: This can also be done using insert into .. select .. (without cursor) as following: Cheers!!
SQL Query to Show When Golfer Not Attached to an Event/Year
I am working on a school assignment that has downright stumped me for days. The task is to, using a view (VAvailableGolfers), populate a list box with Golfers who are not tied to a given event/year selected from a combo box. Here is the data in the tables: The expected output on the form, then, would be: 2015…
sql Query support required for condition
I have a query if vatgroup chooses x6 or x7 in output has to show ‘-‘ other than than it has to show the value what is come. Based on below query my output comes as * for other than x6 or x7. Thanks Vinoth Answer You are casting your integer sum to varchar(1) which means if the sum is
Finding couples of occurrences – Postgresql
I need to find possible couplings of employees and department that they worked for. I need to include only the couplings of 2 different departments, so if an employee worked for more than 2 …
SQL Select or join two separate subsets of a table
Say I have a table Element in my SQL Server database with, we’ll suppose, nothing other than an Id column. I also have tables Foo and Bar, which each have a many-to-many relationship with Element, …
Sum rows together with the same ID but different event logs with conditions
A table has 3 different fields, the first being user_id, event_log, uploaded_files. user_id event_log uploaded_files ——————————————– 1 0001 …