sql
stringlengths
6
1.05M
<reponame>muntaza/Open_Persediaan DROP VIEW IF EXISTS view_beban_barang4_batumandi; CREATE VIEW view_beban_barang4_batumandi AS SELECT *, beban * harga AS jumlah_harga FROM view_beban_barang3_batumandi WHERE 1 = 1 AND beban > 0 AND id_skpd = 32; GRANT ALL PRIVILEGES ON view_beban_barang4_batumandi TO lap_batuma...
use olas; ALTER TABLE `subject_paper` ADD `subp_subtype` VARCHAR(255) NOT NULL AFTER `subp_sub_id`, ADD `subp_paperno` VARCHAR(50) NOT NULL AFTER `subp_subtype`; ALTER TABLE `subject_paper` ADD `subp_degree` VARCHAR(20) NOT NULL AFTER `subp_desp`, ADD `subp_acadyear` VARCHAR(20) NOT NULL AFTER `subp_degree`; ALTER TABL...
<reponame>TTGS/IT_script CREATE or replace FUNCTION xml_split_mul( str xml ,begin_xml_node text default null ,end_xml_node text default null ) RETURNS text[] AS $$ DECLARE --char count p_xml text:=str::text; xn_begin text:=begin_xml_node; xn_end text:=end_xml_node ; arr_save text[]:=null; begin ...
<filename>src/create_table_logs.sql CREATE TABLE `logs` ( `id` VARCHAR(255) NOT NULL, `timestamp` VARCHAR(32) NOT NULL, `level` VARCHAR(32) NOT NULL, `priority` INT(11) NOT NULL, `lifecycle_token` VARCHAR(32) NOT NULL, `parent_lifecyc...
--create range partition table with int data type,insert data to this table and select data in where clause with function 'mod','char_length', and extract create class range_test (id int, test_int int, test_char char(10)) partition by range(test_int) ( partition p0 values less than (10), partition p1 values ...
HDF5 "tslink.h5" { SOFTLINK "slink2" { LINKTARGET "linkvalue" } }
DROP TABLE IF EXISTS `Exploration`;
INSERT INTO history ( from_title, description, amount, "date" ) VALUES ($1,$2,$3,$4) ;
Create table usuarios ( ID Int UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, login Varchar(30), senha Varchar(40), empresa Varchar(40), cnpj Varchar(40), ramo Varchar(40), solicitante Varchar(40), telefone Varchar(40), email Varchar(40), endereco Varchar(40), bairro Varchar(40), cidade Varchar(40), ref Varcha...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 13, 2021 at 05:52 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
USE minors_2022; INSERT INTO firstbase_minors_rankings( first_name, last_name, ORG, ETA, BP, BP_OVR, RW, RW_OVR, CBS, CBS_OVR, FTX, FTX_OVR, RAZZ, RB, RB_OVR, Composite) VALUES ('Spencer','Torkelson','Detroit',2022,1,4,...
CREATE TABLE IF NOT EXISTS store.products ( id INT NOT NULL AUTO_INCREMENT, uuid VARCHAR(60) NOT NULL, sku INT(11) NOT NULL, name VARCHAR(255) NOT NULL, description TEXT NOT NULL, supplier_id INT(11) NOT NULL, created_at timestamp NULL DEFAULT CURRENT_TIMESTAMP, updated_at timestamp NULL...
<reponame>jupli/http-gitlab.bwa.id-8018-jupli-helpus -- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 01, 2018 at 09:30 PM -- Server version: 5.6.35 -- PHP Version: 7.1.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; S...
SELECT * FROM pg_catalog.ts_debug( pg_catalog.get_current_ts_config(), $1);
<filename>MS SQL/CRUD Operations/Create View Employees with Salaries.sql CREATE VIEW V_EmployeesSalaries AS SELECT FirstName, LastName, Salary FROM Employees
create or replace package ext_load_file_pkg authid definer as -- to speed it up create_collection_from_query constant boolean := false; subtype t_boolean is integer; -- must be a SQL type, not a PL/SQL type subtype t_excel_column_name is varchar2(3 char); subtype t_mime_type is varchar2(255 char); subtype t_nls_chars...
/* 01.01. Въведение в базите данни */ /* Problem 10. Създаване на нова база данни */ CREATE SCHEMA IF NOT EXISTS `school`; /* students */ CREATE TABLE IF NOT EXISTS `school`.`students` ( `id` INT(3) NOT NULL, `name` VARCHAR(50) NOT NULL, `age` INT(3) NULL, `phone_number` VARCHAR(50) NULL, PRIMARY KEY (`...
DROP TABLE IF EXISTS `users`; DROP TABLE IF EXISTS `posts`; CREATE TABLE `users` ( `id` bigint(20) AUTO_INCREMENT PRIMARY KEY, `gmt_create` datetime(6) NOT NULL, `email` varchar(256) NOT NULL UNIQUE, `nickname` varchar(256) NOT NULL ); CREATE TABLE `posts` ( `id` bigint(20) AUTO_INCREMENT PRIMARY KEY, `gm...
-- file:privileges.sql ln:61 expect:true GRANT SELECT ON atest1 TO regress_user3, regress_user4
/* Risky Projects https://platform.stratascratch.com/coding/10304-risky-projects?python= Difficult: Medium Identify projects that are at risk for going overbudget. A project is considered to be overbudget if the cost of all employees assigned to the project is greater than the budget of the project. You'll need to p...
# Convert all tables to InnoDB. Although all new installations use InnoDB, some # older ones may still have tables using the MyISAM engine. ALTER TABLE %DB_TBL_PREFIX%area ENGINE=InnoDB; ALTER TABLE %DB_TBL_PREFIX%entry ENGINE=InnoDB; ALTER TABLE %DB_TBL_PREFIX%repeat ENGINE=InnoDB; ALTER TABLE %DB_TBL_PREFIX%room E...
-- -- remove timezone and license key from settings, set in web.xml now -- UPDATE appinfo SET appinfo_value='2007051501' WHERE appinfo_name='db_version'; \connect - jcms DELETE FROM settings WHERE setting_name='site_timezone'; DELETE FROM settings WHERE setting_name='site_licensekey';
<gh_stars>1-10 USE [master] GO /****** Object: Database [WebTask] Script Date: 11/28/2015 15:52:04 ******/ CREATE DATABASE [WebTask] GO ALTER DATABASE [WebTask] SET COMPATIBILITY_LEVEL = 100 GO IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) begin EXEC [WebTask].[dbo].[sp_fulltext_database] @action = 'e...
-- Drop New tables DROP TABLE IF EXISTS `staff_training_needs`; -- Restore Admin - training tables RENAME TABLE `z_1978_staff_training_needs` TO `staff_training_needs`; -- workflow_models DELETE FROM `workflow_models` WHERE `model` = 'Staff.TrainingNeeds'; -- db_patches DELETE FROM `db_patches` WHERE `issue` = 'PHPO...
<filename>farrago/unitsql/optimizer/semijoin.sql -- $Id$ -- Tests semijoin transformations create schema sj; set schema 'sj'; -- set session personality to LucidDB so all tables -- will be column-store by default alter session implementation set jar sys_boot.sys_boot.luciddb_plugin; create table t( a int, b char...
#sql('list') select * from t_user #end
insert into t_xt_authorities_resources (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED) values (1, 'AUTH_ADMIN', 'admin', 1); insert into t_xt_authorities_resources (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED) values (2, 'AUTH_EMPLOYEE', 'employee', 1);
CREATE TABLE `settings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NULL DEFAULT NULL, `default_parent_id` int(11) NULL DEFAULT NULL COMMENT 'id of the map setting this setting is the default child for', `key` varchar(60) NOT NULL, `type` varchar(40) NOT NULL DEFAULT 'String', `value` text N...
fastload table new_order no_o_id 1 no_d_id 2 no_w_id 3 infile '/tmp/new_order.data'
ALTER TABLE products ADD category_id INT NOT NULL AFTER id; CREATE INDEX category_id ON products (category_id); UPDATE products INNER JOIN categories_xref ON products.id = categories_xref.product_id SET products.category_id = categories_xref.category_id; ALTER TABLE products ADD FOREIGN KEY (category_id) REFERENCES...
drop table if exists t1; drop table if exists t2; create table t1(a enum('a', 'b', 'c')); insert into t1 values (1), (2), (3); create table t2 as select cast(a as ENUM('a', 'b', 'c', 'a', 'a', 'a')) col, a from t1; create table t2 as select cast(a as ENUM('a', 'b', 'c','d')) col, a from t1; select cast(a as ENUM('e','...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 14 Apr 2018 pada 16.49 -- Versi Server: 10.1.19-MariaDB -- PHP Version: 5.5.38 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
CREATE SCHEMA IF NOT EXISTS agi_mopublic_pub_export; CREATE SEQUENCE agi_mopublic_pub_export.t_ili2db_seq;; -- SO_AGI_MOpublic_20201009.MOpublic.Bodenbedeckung CREATE TABLE agi_mopublic_pub_export.mopublic_bodenbedeckung ( T_Id bigint PRIMARY KEY DEFAULT nextval('agi_mopublic_pub_export.t_ili2db_seq') ,T_Ili_Tid uu...
<reponame>BrynjarGeir/LeetCode # Write your MySQL query statement below SELECT Department.Name as Department, e.Name as Employee, e.Salary FROM Employee e Inner Join Department ON e.DepartmentID = Department.Id WHERE (SELECT count(Distinct m.Salary) FROM Employee m where m.DepartmentId = e.DepartmentId and m.salary > e...
<gh_stars>0 SELECT title FROM books WHERE title LIKE 'Harry%Potter%'
/*Create a table*/ CREATE TABLE person ( id BIGSERIAL NOT NULL PRIMARY KEY, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, gender VARCHAR(7) NOT NULL, date_of_birth DATE NOT NULL, email VARCHAR(150) ); INSERT INTO person ( first_name, last_name, gender, date_of_birth, email) VAL...
<reponame>martinsivanov/CSharp-Databases-January-2021 --Section 01 CREATE DATABASE TripService CREATE TABLE Cities ( Id INT PRIMARY KEY IDENTITY, [Name] NVARCHAR(20) NOT NULL, CountryCode VARCHAR(2) NOT NULL ) CREATE TABLE Hotels ( Id INT PRIMARY KEY IDENTITY, [Name] NVARCHAR(30) NOT NULL, CityId INT FOREIGN KEY REFER...
CREATE TABLE customer (custId int GENERATED ALWAYS AS IDENTITY, firstName varchar(50) NOT NULL, lastName varchar(50) NOT NULL, PRIMARY KEY(custId)); INSERT INTO customer(firstName, lastName) VALUES ('Josh', 'Bertrand'); CREATE TABLE store (storeId int GENERATED ALWAYS AS IDENTITY, storeName varchar(50), PRIMARY KEY...
<filename>sql/book1/Chapter9_views.sql ---Chapter 9 - VIEWS SELECT e.employee_id , e.last_name , e.department_id , d.department_name , e.salary FROM employees e JOIN departments d ON e.department_id = D.department_id CREATE OR REPLACE VIEW emp_dep AS SELECT e.employee_id , e.last_name , e.department_id ...
<filename>database/fireandincidentsysbackup.sql select * from responses
CREATE TABLE [dbo].[SupplementaryData] ( [SupplementaryDataId] INT IDENTITY (1, 1) NOT NULL, [ConRefNumber] VARCHAR (20) NOT NULL, [DeliverableCode] VARCHAR (10) NOT NULL, [CalendarYear] INT NOT NULL, [CalendarMonth] ...
use [DataWorks] --change the database name to your preference go /* create schema utl; --if you decide to use name 'utl' in your new database, execute this; otherwise, rename 'utl' schema through the scripts go */ set nocount on set transaction isolation level read uncommitted set deadlock_priority low set texts...
SELECT COUNT(*) FROM tag as t, site as s, question as q, tag_question as tq WHERE t.site_id = s.site_id AND q.site_id = s.site_id AND tq.site_id = s.site_id AND tq.question_id = q.id AND tq.tag_id = t.id AND (s.site_name in ('stackoverflow')) AND (t.name in ('amazon-dynamodb','automatic-ref-counting','babeljs','bigdata...
USE chat; INSERT INTO user ( email, password, role, fullName ) VALUES ( '<EMAIL>', '$2a$10$qNl6oSAKpNe1Bqc6CTvJNOWiYgwOPizqJrxGUsv4WcZwqphX5Og6G', 'STANDARD-ROLE', '<NAME>' ), ( '<EMAIL>', '$2a$10$qNl6oSAKpNe1Bqc6CTvJNOWiYgwOPizqJrxGUsv4WcZwqphX5Og6G', 'STANDARD-ROLE', '<NAME>' ), ( '<EMAIL>', '$2a$10$qN...
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Creating primary key [GradebookEntryLearni...
<filename>languages/modules/mips/install/mips.sql<gh_stars>0 DROP TABLE IF EXISTS `shuyang_mips`; CREATE TABLE IF NOT EXISTS `shuyang_mips` ( `siteid` smallint(5) unsigned NOT NULL DEFAULT '1', `sitename` char(30) NOT NULL, `logo` char(100) DEFAULT NULL, `domain` varchar(100) DEFAULT NULL, `setting` mediumtex...
CREATE ROLE new_tenant_mod_orders_storage PASSWORD '<PASSWORD>' NOSUPERUSER NOCREATEDB INHERIT LOGIN; GRANT new_tenant_mod_orders_storage TO CURRENT_USER; CREATE SCHEMA new_tenant_mod_orders_storage AUTHORIZATION new_tenant_mod_orders_storage; CREATE TABLE IF NOT EXISTS new_tenant_mod_orders_storage.purchase_order ( ...
<filename>jwk/migrations/sql/tests/3_test.sql -- +migrate Up INSERT INTO hydra_jwk (sid, kid, version, keydata, created_at) VALUES ('3-sid', '3-kid', 0, 'some-key', NOW()); -- +migrate Down
SELECT c.id, CONCAT(first_name, ' ', last_name) AS full_name FROM colonists AS c JOIN travel_cards AS tc ON c.id = tc.colonist_id WHERE job_during_journey = 'Pilot' ORDER BY c.id
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 06, 2018 at 02:42 AM -- Server version: 10.1.9-MariaDB -- PHP Version: 5.6.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
<reponame>ReubenUnruh/PowerJiraSqlRefresh<filename>Redgate/Views/dbo.vw_Jira_Deployment_Environment.sql SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE VIEW [dbo].[vw_Jira_Deployment_Environment] AS SELECT [Environment_Id], [Environment_Type], [Display_Name], [Update_Refresh_Id] F...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 18, 2018 at 11:18 AM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.3.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
INSERT INTO price (id, currency, price, vehicle_id) VALUES (1, 'USD', 100.50, 1); INSERT INTO price (id, currency, price, vehicle_id) VALUES (2, 'USD', 200.50, 2); INSERT INTO price (id, currency, price, vehicle_id) VALUES (3, 'USD', 300.50, 3); INSERT INTO price (id, currency, price, vehicle_id) VALUES (4, 'USD', 400....
CREATE PROCEDURE [dbo].[spProduct_GetAll] AS begin set nocount on; select Id, ProductName, [Description], RetailPrice, QuantityInStock, IsTaxable from dbo.Product order by ProductName; end
PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL); INSERT INTO "schema_migrations" VALUES('20100325202228'); INSERT INTO "schema_migrations" VALUES('20100325202714'); INSERT INTO "schema_migrations" VALUES('20100326153711'); INSERT INTO "schema_migrations" VA...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.3.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 21 Sep 2021 pada 04.51 -- Versi Server: 5.6.24 -- PHP Version: 5.6.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
SELECT DISTINCT v_R_System.Name0 as [ComputerName], v_R_System.ResourceID, v_GS_WINDOWSUPDATEAGENTVERSION.Version0 AS Version FROM v_GS_WINDOWSUPDATEAGENTVERSION INNER JOIN v_R_System ON v_GS_WINDOWSUPDATEAGENTVERSION.ResourceID = v_R_System.ResourceID GROUP BY v_GS_WINDOWSUPDATEAGENTVERSION.Versi...
<reponame>umaha-acid/slf-sync /** * Author: Fathoni * Created: Feb 14, 2017 */ SELECT kls.id_kelas_mk, mk.kd_mata_kuliah||' '||mk.nm_mata_kuliah||' ('||nk.nama_kelas||') ' as nm_kelas, (SELECT count(*) FROM pengambilan_mk pmk WHERE pmk.id_kelas_mk = kls.id_kelas_mk AND status_apv_pengambilan_mk = 1) as peserta...
INSERT INTO public.filter (id, name, definition) VALUES (2, 'Select All', '{ "match_all": {} }'); INSERT INTO public.filter (id, name, definition) VALUES (1, 'Filename Regex', '{ "regexp": { "File Name.keyword": "${{FILENAME_REGEX}}$" } }'); INSERT INTO public.filter (id, name, definition) VALUES (3, 'Mode Regex', '{ "...
<reponame>archguard/archguard alter table system_info add column `language` varchar(50) not null default 'jvm';
<reponame>ngothanhtung/sqlserver UPDATE Products SET Price = Price * 110% WHERE Price <= 100000
<reponame>oldinaction/smjava /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 60011 Source Host : 127.0.0.1:3306 Source Database : servletblog Target Server Type : MYSQL Target Server Version : 60011 File Encoding : 65001 Date: 2014-11-22 21:36:34 */...
<reponame>LeeBaekHaeng/sql SELECT /* 뷰 */ A.* FROM ALL_VIEWS A WHERE 1 = 1 AND A.OWNER = 'SYS' AND A.VIEW_NAME LIKE 'DBA_TA%' ORDER BY A.VIEW_NAME ; SELECT /* select */ A.* FROM ALL_VIEWS A WHERE 1 = 1 AND A.OWNER = 'SYS' -- AND A.VIEW_NAME LIKE 'ALL_TA%' -- AND A.VIEW_NAME LIKE 'ALL_...
<reponame>niceyang/os-sri INSERT INTO `mydb`.`user` (`name`, `email`,`phone`) VALUES ('Yang', '<EMAIL>', '4123131123'); INSERT INTO `mydb`.`data` (`userid`, `category`,`subcategory`,`data`) VALUES (1, 'A', 'AA', 'DATA1'); INSERT INTO `mydb`.`data` (`userid`, `category`,`subcategory`,`data`) VALUES (1, 'A', 'AB', 'DATA2...
Create VIEW [EntityCode].[LocationTimeRecurring] AS Select LTA.LocationTimeRecurringId As [Id], LTA.LocationTimeRecurringKey As [Key], L.LocationKey, L.LocationName, L.LocationDescription, TA.BeginDay, TA.EndDay, TA.BeginTime, TA...
<filename>Programmable Objects/Stored Procedures/Utility.spGetIndexCreationProgress.sql GO IF OBJECT_ID('[Utility].[spGetIndexCreationProgress]') IS NOT NULL DROP PROCEDURE [Utility].[spGetIndexCreationProgress]; GO SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE [Utility].[spGetIndexCreationPr...
ALTER TABLE oracle_buckets DROP COLUMN namespace;
TCGA-A2-A1G0,TCGA-A1-A0SM,TCGA-E2-A1IU,TCGA-E9-A1QZ,TCGA-E9-A22B,TCGA-C8-A1HE,TCGA-EW-A1PG,TCGA-A1-A0SE,TCGA-E9-A1NG,TCGA-EW-A1OX,TCGA-D8-A1XB,TCGA-A1-A0SQ,TCGA-D8-A1JN,TCGA-A2-A1FX,TCGA-EW-A1IZ,TCGA-A2-A0CT,TCGA-A1-A0SD,TCGA-E9-A1R3,TCGA-A2-A0CP,TCGA-E2-A1LL,TCGA-A2-A0CL,TCGA-A2-A0YD,TCGA-EW-A1J1,TCGA-A2-A0CZ,TCGA-A2-...
<filename>migrations/v0009.sql -- +migrate Down UPDATE releases SET badge_ratings = NULL; -- +migrate Up
<reponame>svennesson/auth-server<filename>src/main/resources/db/migration/V3__Create_login_attempts_table.sql CREATE TABLE login_attempts ( id serial PRIMARY KEY, user_id INT REFERENCES users, success BOOLEAN, timestampz TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() )
/* Warnings: - Added the required column `password` to the `Author` table without a default value. This is not possible if the table is not empty. */ -- RedefineTables PRAGMA foreign_keys=OFF; CREATE TABLE "new_Author" ( "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "email" TE...
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 14, 2018 at 04:02 AM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>bizmaercq/eda-reporting --Global Statistics on FlexPay select aa.ac_branch,sum(Number_Received) Number_Received,sum(aa.Received) Received,sum(aa.commission) Commission, sum(aa.tax) Tax,sum(Number_Paid) Number_Paid ,sum(aa.paid) paid from ( select a.AC_BRANCH, case when a.TRN_CODE = 'TTI' then count(*) e...
<filename>Svetlina/SQL/All SQL tasks/SQL Language - Lab/Employee Address.sql SELECT TOP 5 EmployeeID, JobTitle, a.[AddressID], AddressText From Employees AS e JOIN Addresses AS a ON a.AddressID = e.AddressID ORDER BY a.[AddressID]
<filename>new_site_doc/doc/liuqcup_20210607.sql -- MySQL dump 10.13 Distrib 8.0.16, for Linux (x86_64) -- -- Host: localhost Database: liuqcup -- ------------------------------------------------------ -- Server version 8.0.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARA...
<gh_stars>0 INSERT INTO basked_db.spr_countries_details (id, country_id, name, descr, created_at, updated_at, url, img_flag, img_gerb) VALUES (1, 1, null, 'Австралийский Союз — государство, расположенное на материке Австралия, острове Тасмания и ряде других островов Индийского и Тихого океанов. Занимает 6 место в мире ...
CREATE TABLE CLIENTE ( ID INTEGER PRIMARY KEY AUTO_INCREMENT, NOME VARCHAR(100), CPF VARCHAR(11), DATANASCIMENTO DATE, GENERO VARCHAR(50) ); CREATE TABLE USUARIO( ID INTEGER PRIMARY KEY AUTO_INCREMENT, LOGIN VARCHAR(50) NOT NULL, SENHA VARCHAR(255) NOT NULL, ADMIN BOOL D...
<reponame>lgcarrier/AFW SET DEFINE OFF; CREATE UNIQUE INDEX AFW_12_MEMBR_STRUC_PK ON AFW_12_MEMBR_STRUC (SEQNC) LOGGING /
<reponame>desafinadude/municipal-data -- DROP TABLE uifwexp_facts; CREATE TABLE public.uifwexp_facts ( demarcation_code text REFERENCES scorecard_geography (geo_code), financial_year integer, item_code text, item_label text, amount bigint, id serial, CONSTRAINT uifwexp_facts_pkey PRIMARY KEY (id), CONS...
<reponame>thibault-lr/typescript-hapi-rest-api<gh_stars>1-10 INSERT INTO users("name","department","login","password") VALUES('test','dep1', 'test','test'),('test2','dep2', 'test','test'),('test3','dep3', 'test','test');
--https://dune.xyz/queries/124678 /* lp function */ create or replace function dune_user_generated.get_lp_positions( pair bytea, token bytea, types text, lp_mint_addr bytea, lp_decimal numeric, token_decimal numeric ) returns table (holder bytea, types text, lp_position numeric) as $body$ with lps as ( select s...
-- file:matview.sql ln:186 expect:true SELECT * FROM mvtest_mv_v_4
<gh_stars>0 CREATE OR REPLACE VIEW OSP$UNIT ( UNIT_NUMBER, UNIT_NAME, ADMINISTRATIVE_OFFICER, OSP_ADMINISTRATOR, UNIT_HEAD, DEAN_VP, OTHER_INDIVIDUAL_TO_NOTIFY, ORGANIZATION_ID, UPDATE_TIMESTAMP, UPDATE_USER ) AS select U.UNIT_NUMBER, U.UNIT_NAME, AO.person_id as ADMINISTRATIVE_OFFICER, OA.person_...
<filename>UMKnotPrecise_employess.sql -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64) -- -- Host: localhost Database: UMKnotPrecise -- ------------------------------------------------------ -- Server version 5.7.18-0ubuntu0.16.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 S...
--"rename" UCUM concept [degC] to Cel update concept set standard_concept=null, invalid_reason='U', valid_end_date=current_date where concept_id=8653; insert into concept values(586323,'degree Celsius','Unit','UCUM','Unit','S','Cel',to_date ('19700101', 'YYYYMMDD'),to_date('20991231', 'YYYYMMDD'),null); update concept_...
--liquibase formatted sql --changeset pmuchowski:1519812660070-1 CREATE TABLE call_flow_element_log (id VARCHAR(255) NOT NULL, created_date datetime NULL, updated_date datetime NULL, end_date datetime NULL, start_date datetime NULL, call_flow_element_id VARCHAR(255) NOT NULL, unit_progress_id VARCHAR(255) NOT NULL); ...
SELECT orderid, customerid, shipcountry FROM orders WHERE shipcountry in ('Brazil', 'Mexico', 'Argentina', 'Venezuela')
select type.typename company, pd.prod_name prodName, prod.premium, prod.prod_plan productPlan, sub.depart_user departid, parent.product_plan_id productPlanId, parent.period parentPeriod, sub.period, parent.rate parentRate, sub.id, sub.rate from (select conf1.id, conf1.product_plan_id, conf1.period, conf1...
insert into T_KENNZEICHEN(KENNZEICHEN, RESERVIERT, VERGEBEN, TOKEN) VALUES ('B-ER-1234', 0, 1, null); insert into T_KENNZEICHEN(KENNZEICHEN, RESERVIERT, VERGEBEN, TOKEN) VALUES ('H-AX-1337', 0, 1, null); insert into T_KENNZEICHEN(KENNZEICHEN, RESERVIERT, VERGEBEN, TOKEN) VALUES ('HM-HM-12', 0, 1, null); insert into T_K...
<gh_stars>1-10 SELECT drug_strength.* INTO map.drug_strength_single_ingredient FROM ( SELECT drug_concept_id FROM drug_strength GROUP BY drug_concept_id HAVING COUNT(*) = 1 ) temp LEFT JOIN drug_strength ON drug_strength.drug_concept_id = temp.drug_concept_id ;
--Adapted: 08-Aug-19 (<NAME> -- https://stackoverflow.com/questions/2298550/oracle-any-vs-in) -- Employees who earn the same salary as the minimum salary for each department: SELECT last_name, salary,department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees ...
<filename>etl/etl/lk_vis_part_2.sql -- ------------------------------------------------------------------- -- @2020, Odysseus Data Services, Inc. All rights reserved -- MIMIC IV CDM Conversion -- ------------------------------------------------------------------- -- ----------------------------------------------------...
/* Custom filters are special keywords that resolve as a subquery or list of values. https://docs.snowflake.com/en/user-guide/ui-snowsight-worksheets.html#custom-filters The benefit of filters is: * it's a Single Version of the Truth (SVOT) for your business definitions * users don't need to write addi...
ALTER TABLE CM_SP_PURPOSE_PII_CAT_ASSOC ADD IS_CONSENTED NUMBER(1) DEFAULT 1 NOT NULL;
drop table if exists act_hi_identitylink cascade; -- force-commit
<filename>corpus/sql/training/SQLErrorLogs_queries.sql<gh_stars>100-1000 -- remove duplicates from SQLErrorLogs table select * from SQLErrorLogs a join (select ServerName , Date , spid , Message , max(seq_num) AS max_seq_num from SQLErrorLogs group by ServerName, Date, spid, Message having count...
<filename>payara5/h2db/src/test/org/h2/test/scripts/functions/system/last-insert-id.sql<gh_stars>0 -- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (https://h2database.com/html/license.html). -- Initial Developer: H2 Group -- SET MODE MySQL; > ok create memory table sequence (id...
<filename>openGaussBase/testcase/KEYWORDS/coalesce/Opengauss_Function_Keyword_Coalesce_Case0031.sql<gh_stars>0 -- @testpoint:opengauss关键字coalesce(非保留),作为字段数据类型(合理报错) --前置条件 drop table if exists coalesce_test cascade; --关键字不带引号-合理报错 create table coalesce_test(id int,name coalesce); --关键字带双引号-合理报错 create table coalesc...
<reponame>cscl-git/digit-bpa alter table eg_checklists add column version bigint default 0 ; alter table eg_checklists add column createdby bigint; alter table eg_checklists add column createddate timestamp without time zone; alter table eg_checklists add column lastmodifiedby bigint ;
USE [SoftwareCFP] GO /****** Object: Table [dbo].[Corsi] Script Date: 02/10/2021 12:05:48 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Corsi]( [Id] [int] IDENTITY(1,1) NOT NULL, [IdCorso] [nvarchar](max) NULL, [CodiceDipartimento] [nvarchar](max) NULL, [EdizioneCorso] [nvarcha...