Generate data with built-in functions

xiaoxiao2021-03-06  43

4.1 total function

1 count ------- Select coutn (*) from teacherists where hits / as <.35;

2 SUM --- Returns all values ​​in a column and select SUM (Singles) Total_singles from Teamstats;

3 AVG --- Calculate a list of average SELECT AVG (SO) "AVE_STRIKE_OUTS" from Teamstats;

4 MAX - Find the maximum of a column. Select max (hits) from teamstats;

5 min --- returned a minimum of a column.

6 Variance --- Produces standard variance. Select Variance (Hits) from TeamStats;

7 stddev --- The standard deviation used to get the data. Select Stddev (Hits) from Team Teamstats;

4.2 Date and Time Functions 1 Add_MONTHS / Add_Date adds a value to the month in which a day is located. SELECT TASK, StartDate, Enddate Original, Add_MONTHS (Enddate, 2) from project; 2 last_day returns the last day of the specified month. Select Enddate, Last_Date (Enddate) from project; 3 MONTHS_BETWEEN If you want to know how many months between X-month and Y month SELECT TASK, STRTDATE, Enddate, Months_Between (Enddate, StartDate Duration from Project; 4 new_time If you want to follow Time zone adjustment time, then the new_time function is suitable for this requirement 5 next_day returns the date of the first week of the specified date or thereafter. Select StartDate, Next_Day (StartDate, 'Friday') from project; 6 sysdate Returning System Time and Date Select Distinct Sysdate from Dual; 4.3 Arithmetic Function 1 ASB Returns the absolute value of the specified value 2 CEIL and FLOOR CEIL Returns larger than or equal to the minimum Integer value. The FLOOR function is exactly the opposite to the maximum integer value of less than or equal to the parameter. 3 COS, COSH, SIN, SINH, TAN, TANH4 Exp are the index functions of e a bottom, ie, the number of E.

转载请注明原文地址:https://www.9cbs.com/read-54344.html

New Post(0)