sql stringlengths 6 1.05M |
|---|
<reponame>aasif247/Smart_classroom<filename>public/notices/w1QXe.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 26, 2021 at 06:10 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
STA... |
<reponame>ricardo1470/learn_PostgreSQL<filename>Expresiones condicionales/Greatest y least en PostgreSQL.sql
Select
prestamo.id,
prestamo.usuario_id,
prestamo_detalle.libro_id,
greatest(prestamo.fecha_devolucion, prestamo_detalle.fecha_devuelto)
from prestamo
left join prestamo_detalle on prestamo.id = prestamo_detalle... |
<reponame>RebeccaKoll/pbot_client<filename>sampledb.cql
// People/Person/Users are the highest level of independence in the db schema (at least at this moment) so they get created first
// Should there be a metadata log for who enters the enterers?
// One thing I did that I'm not sure if it is considered kosher or not ... |
<filename>SQL File/flycash .sql
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 19, 2021 at 10:04 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4... |
<filename>2_mysql/day01/xz.sql
SET NAMES UTF8;
DROP DATABASE IF EXISTS xz;
CREATE DATABASE xz CHARSET=UTF8;
USE xz;
CREATE TABLE user(
uid INT,
uname VARCHAR(9),
upwd VARCHAR(16),
email VARCHAR(32),
phone VARCHAR(11),
sex VARCHAR(1),
userName VARCHAR(4),
regTime VARCHAR(10),
isOnline INT(1)
);
INSERT INTO user... |
<filename>html/cambiosdb/AlterTablePrimeraPlana.sql
ALTER TABLE `opemedios`.`primera_plana`
ADD COLUMN `thumb` VARCHAR(150) NULL DEFAULT '-' AFTER `id_fuente`;
|
CREATE TABLE Stores (
store_id INT AUTO_INCREMENT PRIMARY KEY,
store_name VARCHAR(255),
phone VARCHAR(50),
email VARCHAR(255),
street VARCHAR(255),
city VARCHAR(150),
state VARCHAR(150),
zip_code INT
);
CREATE TABLE order_items (
order_id INT,
item_id INT,
product_id INT,
quantit... |
<reponame>bogdanghita/public_bi_benchmark-master_project
--SELECT "TableroSistemaPenal_6"."AUDIENCIA" AS "AUDIENCIA", SUM(CAST("TableroSistemaPenal_6"."Number of Records" AS BIGINT)) AS "sum:Number of Records:ok", CAST(EXTRACT(YEAR FROM "TableroSistemaPenal_6"."FECHA AUDIENCIA") AS BIGINT) AS "yr:FECHA AUDIENCIA:ok... |
insert into pet(name) values ('Rex2')
|
Insert into eg_appconfig (id,key_name,description,version,createdby,lastmodifiedby,createddate,lastmodifieddate,module)
values (nextval('SEQ_EG_APPCONFIG'),'ADDITIONALCONNECTIONALLOWEDIFPTDUE','To check whether Additional water tap connection application allowed if PT Tax due present',
0,null,null,null,null,(select id... |
<reponame>reespozzi/fact-api<filename>src/main/resources/db/migration/V013__add_servicearea_court.sql
CREATE TABLE public.search_serviceareacourt
(
id integer PRIMARY KEY NOT NULL,
servicearea_id integer NOT NULL,
court_id integer NOT NULL,
catchment_type character... |
<filename>tools/sql/ire_export/ire_P30.sql
-- P30. HOUSEHOLD TYPE FOR THE POPULATION IN HOUSEHOLDS
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p30 (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
co... |
-- P12C. SEX BY AGE (AMERICAN INDIAN AND ALASKA NATIVE ALONE)
-- designed to work with the IRE Census bulk data exports
-- see http://census.ire.org/data/bulkdata.html
CREATE TABLE ire_p12c (
geoid VARCHAR(11) NOT NULL,
sumlev VARCHAR(3) NOT NULL,
state VARCHAR(2) NOT NULL,
county VARCHAR(3),
cbsa VARCHAR(5), ... |
<reponame>yuumi3/pg-simple-migration
INSERT INTO groups(name) VALUES('土');
INSERT INTO groups(name) VALUES('水');
INSERT INTO users(name,email,group_id,password) VALUES('山田太郎', '<EMAIL>', 1, '<PASSWORD>');
INSERT INTO users(name,email,group_id,password) VALUES('岡田太郎', '<EMAIL>', 1, '<PASSWORD>');
INSERT INTO users(na... |
-- file:foreign_data.sql ln:511 expect:true
SET ROLE regress_unprivileged_role
|
-- method_of_receipt should be OTHER_DD not OTHER
UPDATE reimbursements SET method_of_receipt = 'OTHER_DD' where method_of_receipt = 'OTHER'; |
<filename>backend/de.metas.banking/de.metas.banking.base/src/main/sql/postgresql/system/5541850_sys_gh6061_AddColumn_ImportedBillPartnerName_to_C_BankStatementLine.sql
-- 2020-01-17T07:35:26.151Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_... |
CREATE TABLE Customers (CustomerID int, CustomerName nvarchar(100), AccountOpenedDate date, CustomerWebSite nvarchar(256), primary key (CustomerID)); |
<filename>migrations/sqls/20170909080508-initialSeed-up.sql<gh_stars>1-10
USE poe_currency;
INSERT INTO leagues (id, name, active) VALUES
(1, 'Standard', FALSE),
(2, 'Hardcore', FALSE),
(3, 'Harbinger', TRUE),
(4, 'Harbinger Hardcore', FALSE);
INSERT INTO currencies (id, name, css, active) VALUES
(1,"Orb of... |
<filename>leetcode_SQL/first-and-last-call-on-the-same-day.sql
/*
1972 - First and Last Call On the Same Day
1972. First and Last Call On the Same Day
Level
Hard
Description
Table: Calls
+--------------+----------+
| Column Name | Type |
+--------------+----------+
| caller_id | int |
| recipient_id | ... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 27, 2018 at 05:14 PM
-- Server version: 5.7.24-0ubuntu0.16.04.1
-- PHP Version: 7.2.12-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!... |
<filename>gpff-sql/procedures/aa2tdih/procCountAa2tdih.sql
--DROP PROCEDURE GPSQLWEB.procCountAa2tdih
CREATE PROCEDURE GPSQLWEB.procCountAa2tdih (
IN P_DIHCLA bigint,
IN P_DIHNOM varchar(40),
IN P_DIHABR varchar(3),
IN P_DIHCCO double,
IN P_DIHCVE double,
IN P_DIHFIX double,
IN P_DIHCTA varchar(12),
IN P_DIHFIB dou... |
alter table OM_PRODUCT add constraint FK_OM_PRODUCT_CATEGORY_ID foreign key (CATEGORY_ID) references OM_PRODUCT_CATEGORY(ID);
create index IDX_OM_PRODUCT_CATEGORY on OM_PRODUCT (CATEGORY_ID);
|
<reponame>NilsPur/firewall-orchestrator<filename>roles/database/files/sql/test/unit-test-cleanup.sql
drop extension if exists pgtap;
-- drop function if exists test_1_schema();
-- drop function if exists test_2_functions(); |
<gh_stars>1-10
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = contactfaune, public, pg_catalog;
--
-- Data for Name: t_fiches... |
SELECT method, count(*) as counts FROM `conversations` WHERE date_created >= '2017-07-01' AND date_created <= '2018-06-30' GROUP BY method ORDER BY counts DESC;
SELECT method, count(*) as counts FROM `conversations` WHERE date_created >= '2018-07-01' AND date_created <= '2019-06-30' GROUP BY method ORDER BY counts D... |
BEGIN TRANSACTION;
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
COMMIT;
|
/*
Post-Deployment Script Template
--------------------------------------------------------------------------------------
This file contains SQL statements that will be appended to the build script.
Use SQLCMD syntax to include a file in the post-deployment script.
Example: :r .\myfile.sql
... |
ALTER TABLE `CubeCart_cats_lang` ADD PRIMARY KEY (`id`), ADD INDEX (`cat_master_id`); #EOQ
ALTER TABLE `CubeCart_transactions` ADD PRIMARY KEY (`id`), ADD INDEX (`customer_id`); #EOQ
ALTER TABLE `CubeCart_category` ADD PRIMARY KEY (`cat_id`), ADD INDEX (`cat_father_id`); #EOQ
ALTER TABLE `CubeCart_cats_idx` ADD PRIM... |
SELECT
f.id,
f.name,
f.size
FROM files AS f
WHERE f.size > 1000 AND f.name LIKE '%html%'
ORDER BY f.size DESC; |
CREATE KEYSPACE IF NOT EXISTS test WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};
USE test;
CREATE TABLE IF NOT EXISTS hello (
greeting TEXT,
name TEXT,
PRIMARY KEY (greeting)
);
INSERT INTO hello (greeting, name) VALUES ('hello', 'world');
INSERT INTO hello (greeting, name) V... |
<gh_stars>0
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- =================================================================
-- Table structure for basic_curve_popup_card
-- =================================================================
DROP TABLE IF EXISTS `basic_curve_popup_card`;
CREATE TABLE `basic_curve_pop... |
DROP TABLE IF EXISTS aux.kid_wic_min_date;
CREATE TABLE aux.kid_wic_min_date AS (
SELECT kid_id, least(
-- discard prenatal nonsense prenatal entries
min(CASE WHEN date_of_birth - visit_d < 365 THEN visit_d END),
min(register_d), min(partenrl.last_upd_d), min(partaddr.last_upd_d)) as date
FROM aux.kid_wic... |
CREATE INDEX idx_thought_username ON thoughts(username);
--;;
CREATE INDEX idx_reminder_thought_id ON reminders(thought_id); |
drop table user_login;
--run
|
-- This file should undo anything in `up.sql`
CREATE OR REPLACE FUNCTION payment_service.get_last_paid_payment(subscription_id uuid)
RETURNS SETOF payment_service.catalog_payments
LANGUAGE sql
STABLE
AS $function$
SELECT
*
FROM payment_service.catalog_payments cp
WHERE cp.subscr... |
# SHOW databases;
# CREATE DATABASE DogApp;
# SHOW DATABASES;
# USE DogApp;
# DROP DATABASE DogApp;
# SHOW DATABASES;
# CREATE DATABASE bakery;
# USE bakery;
# CREATE TABLE pastries(
# name VARCHAR(50),
# quantity INT
# );
# DESC pastries;
# DROP TABLE pastries;
# SHOW TABLES;
# CREATE TABLE cats... |
<filename>transaction/src/main/resources/import.sql
// Add Transaction data
|
select count(*) from bilibili_cnki.reply; |
<gh_stars>0
-- ===========================================================================
-- ReportsList Loader
-- Author: Infixo
-- 2019-03-30: Created
-- I hereby grant the permission to use RLL in other Civ6 mods provided no changes are made to the code.
-- 2019-06-20: Updated for June 2019 Patch (Gossip tab)
... |
--TEST: pass bit/blob/clob type values to the first param
drop table if exists p_cont;
create table p_cont(
col1 bit(20),
col2 bit varying,
col3 blob,
col4 clob,
num int
);
insert into p_cont values(B'1011', X'abc', X'0', 'cubrid', 70);
insert into p_cont values(B'1011', x'bcd', X'1', 'cubrid', 60);
insert int... |
<gh_stars>0
CREATE OR REPLACE
ALGORITHM = UNDEFINED VIEW hic_covid.virology_export AS
SELECT
'NIHR Leicester Biomedical Research Centre' AS BRC,
'RWE' AS Organisation,
d.participant_identifier AS Subject,
COALESCE(v.laboratory_code, '') AS laboratory_code,
COALESCE(v.order_code, '') AS order_code,
... |
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 27, 2018 at 12:24 PM
-- Server version: 5.6.40
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
<filename>DB/biblioteca.sql
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-06-2019 a las 12:15:13
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.2.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTIO... |
<filename>Labs/Lab 9/populate.sql
drop table persons;
create table persons(
person_id integer,
person_name varchar(20),
person_surname varchar(20),
person_age integer not null,
person_wealth integer,
person_weight float
);
drop table jobs_person;
create table jobs_person(
jobs_id integer,
person_id integer,
start_date... |
<filename>database/base_schema/create_social_accounts_table.sql
DROP TABLE IF EXISTS social_accounts CASCADE;
CREATE TABLE social_accounts (
id VARCHAR,
name VARCHAR,
type VARCHAR DEFAULT 'unknown',
user_id UUID NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updat... |
SELECT * FROM `widget` WHERE `new_id` = '5' LIMIT 1
SELECT * FROM `person` WHERE `name` = "Fred" AND (`age` = 20 OR `age` = 25) ORDER BY `name` ASC;
SELECT * FROM `widget` WHERE `name` LIKE '%Fred%' LIMIT 1
SELECT * FROM `person`;
SELECT * FROM `widget` WHERE (( `score` > '5' AND `age` > '10' ) OR ( `score` > '15' AND ... |
<gh_stars>1-10
select city from weather where temp_lo = (select max(temp_lo) from weather); |
<gh_stars>1-10
USE [Koski_SA]
GO
/****** Object: Table [sa].[opiskelijavuodet_valitaulu] Script Date: 17.9.2019 16:23:40 ******/
DROP TABLE IF EXISTS [sa].[opiskelijavuodet_valitaulu]
GO
/****** Object: Table [sa].[opiskelijavuodet_valitaulu] Script Date: 17.9.2019 16:23:40 ******/
SET ANSI_NULLS ON
GO
SET QUOT... |
<gh_stars>1-10
# $Id: CleanJobTable.sql,v 1.2 2006/01/27 00:55:35 fine Exp $
# Author: <NAME> (<EMAIL>) 26.01.2006
# Clear the job description table
use logger;
SHOW tables;
DELETE FROM JobDescription;
DESCRIBE JobDescription;
|
-- pager2.test
--
-- execsql {
-- PRAGMA cache_size = 10;
-- CREATE TABLE t1(i INTEGER PRIMARY KEY, j blob);
-- }
PRAGMA cache_size = 10;
CREATE TABLE t1(i INTEGER PRIMARY KEY, j blob); |
-- file:rangetypes.sql ln:17 expect:true
select '(],a)'::textrange
|
# chainGap.sql was originally generated by the autoSql program, which also
# generated chainGap.c and chainGap.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#alignment block in chain
CREATE TABLE chainGap (
tName varchar(255) not n... |
<reponame>xlm1226/A-Definitive-Guide-to-Apache-ShardingSphere
DROP SHARDING SCALING scaling_name;
|
/*
* Library: IMMZ.IND.01
* Immunization coverage for BCG (Estimated Denominator)
* Compares the doses of BCG vaccine administered with the estimated number of live births as a percentage.
*
* Numerator: Number of administrations of BCG during the reporting period
* Numerator Computation: COUNT immunization ev... |
<reponame>vskurikhin/href-on-spring
-----------------------------------------------------------------------------------
CREATE SEQUENCE IF NOT EXISTS employees_seq
START WITH 207
INCREMENT BY 1
;
CREATE TABLE IF NOT EXISTS employees (
employee_id BIGINT UNIQUE DEFAULT nextval('employees_seq') NOT NULL
, ... |
<reponame>conreality/conreality.sql
DROP TABLE IF EXISTS conreality.entity CASCADE;
-- An abstract entity.
CREATE TABLE conreality.entity (
-- The entity's sequential identifier (ID).
id bigserial NOT NULL PRIMARY KEY,
-- The entity's universally unique identifier (UUID).
uuid uuid NOT NULL DEFAULT gen_rando... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS items
( forumID integer primary key autoincrement,
name varchar(200),
description varchar (200),
created TIMESTAMP
);
CREATE TABLE IF NOT EXISTS comments
( forumID integer primary key autoincrement,
comment varchar(500),
item_id integer references items(fo... |
create table USER (
ID INTEGER not null generated by default as identity (start with 1),
ACCOUNT varchar(255) not null,
PASSWORD varchar(255) not null,
EMAIL varchar(255),
ROLE varchar(32) not null,
CREATED timestamp not null,
LAST_LOGIN timestamp not null,
TAGS varchar(16M), -- e.g. HERDER-GYMNASIUM K... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50732
Source Host : localhost:3306
Source Schema : guns
Target Server Type : MySQL
Target Server Version : 50732
File Encoding : 65001
Date: 19/02/20... |
<filename>jcms/sql/layouts.sql
--
-- PostgreSQL database dump
--
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_... |
<filename>chapter9-multi-instance/src/main/resources/sql/schema.sql
drop table if exists LEAVE1 ;
create table LEAVE1(
ID bigint not null auto_increment comment 'ID',
PROCESS_INSTANCE_ID VARCHAR(64) comment '流程ID',
USER_ID VARCHAR(20) not null comment '工号',
START... |
<reponame>pribtech/nodete<filename>db2te/tutorials/tutorials/DecimalNumericFunctions/SQL/RoundFunction.sql
select number, round(number,0) from ?SCHEMA?.show_decimal; |
<reponame>reclada/db
CREATE MATERIALIZED VIEW reclada.v_object_status
AS
SELECT obj.id ,
obj.GUID as obj_id,
obj.attributes->>'caption' as caption,
obj.created_time ,
obj.attributes as attrs
FROM reclada.object obj
WHERE class in (select reclada_obje... |
--
-- Created by SQL::Translator::Producer::SQLite
-- Created on Fri Jun 21 09:41:15 2019
--
BEGIN TRANSACTION;
--
-- Table: division
--
DROP TABLE division;
CREATE TABLE division (
division_id INTEGER PRIMARY KEY NOT NULL,
division varchar(256) NOT NULL
);
CREATE UNIQUE INDEX division_uniq ON division (divisio... |
<filename>tests/queries/0_stateless/02160_h3_rads_to_degs_degs_to_rads.sql<gh_stars>1-10
-- Tags: no-fasttest
DROP TABLE IF EXISTS h3_indexes;
CREATE TABLE h3_indexes (degrees Float64) ENGINE = Memory;
INSERT INTO h3_indexes VALUES (-1);
INSERT INTO h3_indexes VALUES (-180);
INSERT INTO h3_indexes VALUES (-180.6);... |
select
nullif(1, 2)
|
<reponame>connormcd/misc-scripts
REM
REM Standard disclaimer - anything in here can be used at your own risk.
REM
REM It is very likely you'll need to edit the script for correct usernames/passwords etc.
REM
REM No warranty or liability etc etc etc. See the license file in the git repo root
REM
REM *** USE AT YOUR OW... |
-- Drop dev user if exists
DROP USER IF EXISTS 'dev'@'%';
-- Create dev user and grant all privileges
CREATE USER 'dev'@'%' IDENTIFIED BY 'dev';
GRANT ALL PRIVILEGES ON * . * TO 'dev'@'%';
FLUSH PRIVILEGES;
-- Create default_db if not exists
CREATE DATABASE IF NOT EXISTS default_db;
-- Output success status
\! echo ... |
DROP TABLE IF EXISTS `note`;
CREATE TABLE `note` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
`description` longtext,
`date` bigint(13) DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `note` VALUES (1,'Meeting some one','Meeting some one\nthis is... |
<gh_stars>0
CREATE PROC usp_GetEmployeesSalaryAboveNumber
@SalaryLimit DECIMAL(18,4)
AS
SELECT FirstName, LastName FROM Employees
WHERE Salary>=@SalaryLimit |
USE DAWN;
INSERT INTO USER VALUES (0, "lightbells", "https://dawn.shinbunbun.info/", "test", "らいとべる", "2001-01-19", 0);
INSERT INTO CREATOR VALUES (0, 1, "<NAME>");
INSERT INTO CONTACTS VALUES (0, 1, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO JOB VALUES (0, 1, "Engineer", "2021-01-01"); |
-- Create a new view called 'VW_BookInfos' in schema 'dbo'
-- Drop the view if it already exists
IF EXISTS (
SELECT *
FROM sys.views
JOIN sys.schemas
ON sys.views.schema_id = sys.schemas.schema_id
WHERE sys.schemas.name = N'dbo'
AND sys.views.name = N'VW_BookInfos'
)
DROP VIEW dbo.VW_BookInfos
GO
-- Create ... |
<filename>src/DAL/DBScripts/TestQuestionTable.sql
CREATE TABLE [dbo].[TestQuestion]
(
[Id] INT NOT NULL PRIMARY KEY IDENTITY,
[QuestionID] INT NOT NULL,
[QuetionType] VARCHAR(MAX) NOT NULL,
[TestPaperID] INT NOT NULL
Foreign key (TestPaperID) References TestPaper(Id)
)
|
<reponame>tushartushar/dbSmellsData<gh_stars>1-10
CREATE TABLE schema_migrations ( version character varying(255) NOT NULL)
CREATE TABLE authentications ( id integer NOT NULL, user_id integer, provider character varying(255) NOT NULL, proid character varying(255) NOT NULL, token character varying(255), refresh_token ch... |
<gh_stars>1-10
SELECT
*,
count(*),
current_date,
current_time,
current_timestamp,
current_time,
current_timestamp,
localtime,
localtimestamp,
localtime,
localtimestamp,
transaction_timestamp(),
statement_timestamp(),
clock_timestamp(),
timeofday(),
now(),
... |
<reponame>davidames/SQLPerfMonDW<filename>SQLPerfMonDB/Reporting/initalDataScripts/usp_PopulateReportConfiguration.sql<gh_stars>1-10
CREATE PROCEDURE [dbo].[usp_PopulateReportConfiguration]
AS
SET IDENTITY_INSERT PerfMonReports ON
MERGE INTO [PerfMonReports] AS Target
USING (VALUES
(1)
) AS Source ([PerfMonRepor... |
<gh_stars>10-100
/*
Author : <NAME>
Email : <EMAIL>
GitHub : github.com/suresh021
URL : psuresh.com.np
*/
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 19, 2017 at 03:40 AM
-- Server version: 5.6.16
-- PHP Versio... |
ALTER TABLE `users` ADD INDEX `index_search_permission` (`permission`);
ALTER TABLE `users` ADD INDEX `index_search_status` (`status`);
ALTER TABLE `posts` ADD INDEX `index_search_status` (`status`);
ALTER TABLE `posts` ADD INDEX `index_search_type` (`type`);
ALTER TABLE `posts` ADD INDEX `index_search_language` (`la... |
<gh_stars>100-1000
-- select3.test
--
-- execsql {
-- CREATE TABLE t2(a,b);
-- INSERT INTO t2 VALUES(1,2);
-- SELECT a, sum(b) FROM t2 WHERE b=5 GROUP BY a;
-- }
CREATE TABLE t2(a,b);
INSERT INTO t2 VALUES(1,2);
SELECT a, sum(b) FROM t2 WHERE b=5 GROUP BY a; |
SELECT * FROM VoptionTableWithDto
|
--Add Additional Task Type Mapping
/***********************************************************
Update Mapping Names
***********************************************************/
-- AzureBlobStorage_Excel_AzureSqlTable
Update [dbo].[TaskTypeMapping]
Set MappingName = 'AzureBlobStorage_Excel_AzureSqlTable_NA'... |
-- 26.11.2015 11:13
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Field SET Description='Sagt aus, ob zu diesem Vorgang weitere Abrechnungen stattfinden werden', Help=NULL, IsCentrallyMaintained='N', Name='Material-Vorgang ist abgeschlossen',Updated=TO_TIMESTAMP('2015-11-26 11:13:26','YYY... |
<gh_stars>0
DROP TABLE IF EXISTS rds;
CREATE TABLE rds
AS
SELECT
linkedaccountid, split_part(resourceid, 'db:', 2) AS instance_id
, split_part( usagetype,'Usage:',2 ) AS instance_type
, split_part( split_part( itemdescription,'running ',2 ),split_part( usagetype,'Usage:',2 ),1 ) AS platform
, availabilityzone
... |
<reponame>Gifar/aplikasi-tagihan
insert into debitur (id, nomor_debitur, nama, email) VALUES
('tester001', '17020001', 'Tester Student 001', '<EMAIL>');
|
DROP TABLE IF EXISTS MAIN_RECURRING_APPOINTMENT;
CREATE TABLE MAIN_RECURRING_APPOINTMENT
(
ID SERIAL PRIMARY KEY,
REPEAT_PERIOD VARCHAR(20),
COUNT INT
);
COMMENT ON TABLE MAIN_RECURRING_APPOINTMENT IS 'Record recurring appointments made through DPS';
CREATE INDEX MAIN_RECURRING_APPOINT... |
<reponame>Madhur1997/skeema<gh_stars>1000+
CREATE TABLE one (
id int unsigned NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE glorp.two (
id int unsigned NOT NULL,
PRIMARY KEY (id)
);
use bar;
CREATE TABLE three (
id int unsigned NOT NULL,
PRIMARY KEY (id)
);
|
DO $$
DECLARE @X INT = 4
IF (@X = 3)
PRINT '3'
ELSE IF (@X = 4)
BEGIN
PRINT 'the answer is: '
PRINT '4'
END
ELSE IF (@X = 5)
PRINT '5'
ELSE
PRINT 'unknown'
$$LANGUAGE 'pltsql'
|
-- @testpoint: 匿名块使用操作符 >>二进制右移
DROP TABLE IF EXISTS test_procedure_insert_087;
create table test_procedure_insert_087(id int,
name varchar2(20));
declare
sqlstr varchar(1024);
begin
sqlstr := 'insert into test_procedure_insert_087(SELECT 8>>2 AS RESULT, 5)';
execute immediate sqlstr;
end;
/
select * from test_proced... |
<reponame>opengauss-mirror/Yat
-- @testpoint: kmeans创建mode,带不正确的超参seeding_function,合理报错
--step1: 建表并插入数据;expect: 建表并插入数据成功
drop table if exists t_model_tab_0123;
create table t_model_tab_0123(id integer not null,
"position" double precision[] not null,
closest_centroid integer not null,
l1_distance double ... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: May 16, 2020 at 12:22 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<reponame>TimeBombx/launch_academy
DROP TABLE IF EXISTS groceries;
CREATE TABLE groceries (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
|
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: dhtmlx_samples
-- ------------------------------------------------------
-- Server version 5.5.41-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESU... |
<filename>db/scripts/mssql.0052.alter-proc-users-insert-by-provider.sql<gh_stars>0
ALTER PROCEDURE [dbo].[SPUsersInsertFromProvider]
(@UserName nvarchar(50)
,@UserProfile nvarchar(max)
,@UserSignature nvarchar(max)
,@UserGroupId smallint
,@UserBirthDate datetime
,@UserWebsite nvarchar(255)
,@UserGuid c... |
<filename>DataBaseScripts/ReceiptsPayment/SP_getSelectedReceipts.sql
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <NAME>
-- Create date:
-- Description: Querrys selected receipts with moratory interest (Single User Table)
-- =============================... |
CREATE TABLE tblclientevenda(
id bigint not null,
id_cliente bigint not null REFERENCES tblcliente(id),
status varchar(10) not null,
id_forma_pagamento_tipo bigint null REFERENCES tblformapagamentotipo(id),
desconto decimal(5,2) not null DEFAULT 0,
agravo decimal(5,2) not null DEFAULT 0,
val... |
<reponame>marouanetaki/Gst_Restaurant
-- --------------------------------------------------------
-- Hôte : 127.0.0.1
-- Version du serveur: 5.7.24 - MySQL Community Server (GPL)
-- SE du serveur: Win64
-- HeidiSQL Version: 10.2.0.5599
-- ---------------------... |
ALTER TABLE `erp_material_requisition_details` ADD `cancel_requisition` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `requisation_send_purchase`; |
SELECT
ws.id_manifestante,
ws.id_ws_protocolo_operacao protocolo,
ws.dth_inclusao,
p.num_processo,
p.id_classe_judicial,
o.cod_orgao,
o.sig_orgao,
o.des_orgao
FROM
ws_protocolo_operacao ws
INNER JOIN
processo p
ON (ws.num_processo = p.num_processo)
LEFT JOI... |
create table team
(
id bigint not null,
epost varchar(255) not null,
navn varchar(255) not null,
slack_kanal varchar(255) not null,
slack_kanal_id varchar(255) not null,
has_notified boolean not null default false,
primary key (id)
);
alter tab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.