Iterate an array using only select query in teradata

I’m trying to achieve the output table using the input table. The input table contains id and name where id has the numerical values and name contains JSON value. I can get the output by writing a …

How to select JSON property in SQL statement?

I have field of type json. Example value is: [{“id”: “960287”, “src_ip”: “X.X.X.X”, “filename”: “XXX-20200408092811-0”, “order_id”:…

Simplification of SQL Query

SQL is not my specialty. I have a working query that accomplishes what I need it to, but I know there has got to be a cleaner way of accomplishing my goal. The query should return: – Name – Date of …

SQL query filter down to only applicable rows

How would I select a query like this? I am a bit confused because this would return nothing since any of the rows do not fulfill any of the “where clauses”.. What I would like is the answer …

How to access a table with username with special characters in Oracle sql Developer

I have the following usernames/schema: shopping shops[shopping] In both users I created a table named “SHOP_TAKE_CART”, I use shopping for testing purposes and shops[shopping] to publish …

Postres SQL select with GROUP BY and COUNT

i have this SQL select SELECT t.debtor_account, COUNT(t.debtor_account) FROM transaction t GROUP BY t.debtor_account HAVING COUNT(t.debtor_account) > 2; which work, but i need select all from …

What happens when a comma is not placed following an existing field name in SQL

This is with regard to the SQL Tryit Editor provided by W3 Schools. (Saying this just in case it is an environment-specific problem) The code SELECT CustomerName, Address, City, PostalCode FROM …

When inserting multiple record into a SQL table it does not follow the order

When using a single insert statement to add multiple records into a table as shown below, it does not follow the same order when selecting. I understand that it does not affect anything but may I know …

SQL: Change the value of a column in function of another

I get a table from SQL that I put whitin a winform’s datagridview. I just want to change the value of my last column in funtion of another. Here is the example: I have 4 columns : ID / Price / …

using case statement in a where clause

Hello I am missing something because my code errors. select * from ##ScheduleDetail SD left join ##HolidayFilterTbl HF on SD.Scheduledate = HF.Testdate where (ScheduleDate = testdate) and (Case …