I have Table A and Table B I’m looking to join both the tables with all columns in each table. If any record is not matching then we need to remove all the SK. For 17734 value all the columns from the both tables are matching then I need to get the values for 17734 . For 16601 value only
Tag: sql
How to group results by values that are inside json array in postgreSQL
I have a column of type jSONB that have data like this: column name: used_filters row number 1 example: row number 2 example: I want to group the result to get the most frequent value for each one of the keys something like this: key most_freq category economic tags eco-friendly keyword 2050 the keys are not …
How to return 14th day from month which was 2 months ago with determinated time in Oracle SQL?
How can I take the 14th day from month which was 2 months ago with time 23:59:59 in Oracle SQL ? I have query like below and I need answer something like below (similar style): Above query return: 21/12/31, nevertheless I need query like above which will return value: ’21/12/14 23:59:59′ Answer Yo…
sql as i required want to calc week based on date of each month 1st day and also want week start and week end date based on week
Answer
When I perform an update – rows keep updating if I run the query again
I am updating a table as follows: Which gives the result ‘Query returned successfully: 6 rows affected, 26 msec execution time.’ If I run the same query again it still says gives the result ‘Query returned successfully: 6 rows affected, 26 msec execution time.’ – I would have tho…
NULL values not filtered out with WHERE statement
When I select these columns, I see that the results have some NULL values. They don’t seem to be strings. However, when I try to filter the NULL values out with a where statement: I don’t see any results. What might be the possible causes? I also tried filtering with ‘NULL’ but that wo…
Find minimum and show the area/values around it
I would like to find a minimum in a very long time series, but instead of show the whole series with 2000 points, or only 1 line, I want to show the 20 rows with the profit value before and after the minimum, result example : So, per company, find the minimum, then print the “area” around the mini…
SQL query to find first six characters of the first name if the name is too short append $
Attached two images the first image is the question second image is the code that which I tried. I am stuck with append $ . I have even added my code T-sql: Answer Just try this:
Prioritising column in a left join SQL
I am having issues with a join and I was hoping to get some help. I have one table (table A) that is structured like so: Fruit SKU Apple 001 Apple X01 Apple B01 Banana 002 Banana X02 Banana B01 Orange 003 Orange B03 For each fruit, there is a SKU that corresponds to the numbering system used in a
C# is adding 00:00:00 unnecessarily
My SQL Server is using the DATE datatype, but my C# app is reading this as ‘mm/dd/yyyy 00:00:00’, can anyone tell me how to get rid of the 0s? (everything else works)…? Answer If you don’t want the time portion of a DateTime as String you have several options: Read: Date and time forma…