i have a student table as : I have a stud_claim table as is : student_id is the foreign key of student table. At stud_claim table, I have paid_date column .paid_date has some data and some row is null.I need to update stu_claim table where paid_date is null and put the value of the service_date in that paid_d…
Tag: sql
MySQL count values and put custom columns
I have this query: SELECT count(password) as normal, count(fb_id) as fb, count(google_id) as google, count(linkedin_id) as linkedin FROM `users` which returns (correctly) : normal | fb | google | …
Get the rows of my output sorted in ascending order from this table?
I am using SQL Server 2014 and I have the following table (t1) which contains around 5,000 rows. Here is an extract of t1: n1 n2 n3 n4 n5 n6 Type 6 15 10 11 22 25 C1 2 …
SQL: calculating distances between a town and multiple other locations
I have three tables in Oracle: HOTEL: Lists the hotel number, hotel name, and the town ID of where the hotel is located. There are 5 rows here (meaning 5 hotels, but not every town has a hotel). …
Join Two Tables Then Transpose Rows From One Table As Column Names
I’m trying to join two tables ColumnNames ID |Name |Type |Status | —————————————————– 1 |Fullname |varchar |Active 2 |Email |varchar |Active …
Is there a best way to get data from snowflake to s3
Is there a best way to get data from snowflake to s3. ? the data snowflake shows will be in s3, but we don’t have access to that bucket. And we only need to get the specific tables from Snowflake not the entire data. Answer you will want the unloading into Amazon S3 documentation. you can ether choose a…
Insert stored procedure output data into a column of a table
I created a stored procedure in SQL Server. The stored procedure subtracts two columns in the same table. How do I insert this stored procedure data into a Inventory column of the dbo.Store table? The …
Big Query data totals are wrong, suspect duplicate rows after LEFT JOIN
I’m trying to join two tables in Google Big Query and I think it’s duplicating a few rows (I’m guessing this because the totals are wrong when I then use the data in Data Studio). To give some …
Shapiro-Wilk test
In PL/SQL, I want to calculate the Shapiro-Wilk value of my selected data. Apparently, the function DBMS_STAT_FUNCS.normal_dist_fit is able to do it, but it takes a table name as a parameter, and not the result of a select. The values I am working with are numbers, selected after many inner joins. Here is a s…
MySQL SELECT 1 Parent many Children values
I have one parent with many children and I would like from the parent Id selecting value from 3 children, if it’s possible. I tried this SELECT children1.value1, children2.value2, children3.value3 …