I have 2 tables inquiry and Application table I want to build a view that contains the user information based on data from these two tables. Example I Have Table Inquiry FirstName, LastName, Address, email I have table Application FirstName, LastName, Address, email Am querying the tables using the email fiel…
Oracle query only runs consistently when adding a random comment
Edit: Solved! thanks to @kfinity. AskTom suggests using select /*+ opt_param(‘_optimizer_use_feedback’ ‘false’) */ at the start of your query to disable the feedback usage. This has fixed the …
How can i typecast a varchar to float for using aggregate sum() function with group by
I have a table called Fare: CREATE TABLE Fare ( Date DATE NOT NULL, CardFare VARCHAR(5) NOT NULL, FullFare VARCHAR(5) NOT NULL ) I have to group by date and sum cardfare and fullfare …
SQL group records by date/hour/minute and join table
Given the following 2 tables TableA |ParameterId|ParameterName| |———–|————-| |0 |Param_A | |1 |Param_B | |2 |Param_C | |3 |Param_D …
Query response in JSON format without column name
My table schema is something like this, Initially, my procedure was returning with data as After processing the data, to the web page is sent as If I use the result will be like So what I need to get is the same response but without column name, as front-end lib uses the JSON array without keys. SQL Server ve…
How to get Old Value from Incremental Year values?
I have two tables: Table1: | Year | CRN | CID | Cap | | 201910 | 14 | ABC1 | 12 | | 201910 | 15 | ABC1 | 14 | | 201820 | 25 | ABC1 | 15 | | 201820 | 26 | ABC1 | 25 | | …
SQL group by (count,sum)
Hello i need help abou SQL a have this table and i need this result. thanks for your attention and your answers. select to_char(r.date,’yyyy’) YEAR, sum(1), sum(r.cafe) cafe, sum(r.drink) drink, …
How to assign @variables in tableau
I am trying to use the following in Tableau to declare date variables, which I later call them in the SQL code. But I am unable to do the same in Tableau. Can you please help/guide me in the right …
Split a string into two fields based on multiple words
I have the following column in my Table name:STAT It would be helpful if someone can assist in writing a mysql script I would like to split the strings in to 2 columns. However the split should happen only based on the last word, i.e the Region as can be seen in the example below. There is an exception that
Converting multiple rows into one row by ID
What I am trying to achieve is group them by id and create a column for the date as well as data. The background of the dataset are it is lab result taken by participant and some test are not able to …