blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
0b9a616d2617cecc2e3b7ceb2702550600ed7a9c | SQL | BingHuang-Chin/IS212-LMS-Back | /hasura-migrations/migrations/default/1635261216538_modify_primarykey_public_enrolment/up.sql | UTF-8 | 217 | 2.75 | 3 | [] | no_license | BEGIN TRANSACTION;
ALTER TABLE "public"."enrolment" DROP CONSTRAINT "enrolment_pkey";
ALTER TABLE "public"."enrolment"
ADD CONSTRAINT "enrolment_pkey" PRIMARY KEY ("course_id", "learner_id");
COMMIT TRANSACTION;
| true |
7c63feca491bd4db2d6b11a33361c766dc60128b | SQL | PraktikumWebdas4103/jurnal-modul-6-dianwp | /mahasiswa.sql | UTF-8 | 1,744 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 09 Okt 2018 pada 11.58
-- Versi server: 10.1.34-MariaDB
-- Versi PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
7986c705ca0b875394650468cb45f1f3c759332f | SQL | nuwandavek/deproj5 | /models/dataeng/start_trips_station.sql | UTF-8 | 906 | 3.625 | 4 | [] | no_license | select station_id, year, month, day, hour, day_of_week,
case when day_of_week in (1,7) then "weekday" else "weekend" end as day_of_week_type,
case when hour in (0,1,2,3,4,5) then "night" when hour in (6,7,8,9,10,11) then "morning" when hour in (12,13,14,15,16,17) then "afternoon" else "evening" end as hour_type,
count... | true |
46075c6c8a9180cf3327cd6b5c51db4c4dc01a7a | SQL | adam-ziel/DBMS-Final | /Combined-DDL-DML/Student.sql | UTF-8 | 1,409 | 3.25 | 3 | [] | no_license | CREATE TABLE `Student` (
`StudentID` INTEGER PRIMARY KEY,
`FName` TEXT,
`LName` TEXT,
`MajorID` TEXT,
FOREIGN KEY(`MajorID`) REFERENCES `Major`(`MajorID`)
);
-- BSCE
INSERT INTO Student VALUES (NULL, "George", "Lucas", "BSCE");
-- BCOS
INSERT INTO Student VALUES (NULL, "Bobby", "Laughlin", "BCOS");
INSERT INTO S... | true |
5aaf817c5d8ad5e38d5694c98a79fd57373a2937 | SQL | ivanchenko-m-v/mac_mediator | /sql/20141118_update.sql | UTF-8 | 4,332 | 2.890625 | 3 | [] | no_license | BEGIN TRANSACTION;
--ПЕРЕИМЕНОВАТЬ ХАЛИЛОВА ВМ->НОВИКОВА ВМ
UPDATE t_mediator SET x_mediator='Новикова Вусало Мазахировна' WHERE i_mediator=12;
--Убрать у Новиковой МВ ответственность за ЮВАО
DELETE FROM t_mediator_ad WHERE ((i_mediator=11)AND(i_administrative_division=5));
--+ Соломенко Владимир Юрьевич
INSERT INTO t... | true |
f8f8c35a89c8d8a117b0037e5c66ef1843e3c55e | SQL | gbhl/bhl-us | /Database-BHL/annotation/Stored Procedures/AnnotationConceptDeleteAuto.sql | UTF-8 | 654 | 3 | 3 | [] | no_license |
-- AnnotationConceptDeleteAuto PROCEDURE
-- Generated 1/7/2011 3:13:11 PM
-- Do not modify the contents of this procedure.
-- Delete Procedure for AnnotationConcept
CREATE PROCEDURE [annotation].AnnotationConceptDeleteAuto
@AnnotationConceptCode NVARCHAR(20)
AS
DELETE FROM [annotation].[AnnotationConcept]
WHERE... | true |
d42d096e3c6d2df020fa466c0e94749c75af7ec8 | SQL | NicoSalina/PWEB_NATATORIO | /db/tp_final.sql | UTF-8 | 8,933 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 16-08-2021 a las 23:35:02
-- Versión del servidor: 10.4.19-MariaDB
-- Versión de PHP: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
6def5281b8512646011b4e8f96057c65f64c0cc2 | SQL | andrewsselvaraj/kt | /waste_products.sql | UTF-8 | 3,205 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 03, 2012 at 06:12 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!... | true |
263d953606f8e44d0fe940c5d63f2df39cc06737 | SQL | timomwa/hearth | /configuration/original_images.sql | UTF-8 | 2,757 | 3.390625 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE `album` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`name` varchar(45) NOT NULL,
`dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`deleted` tinyint(1) DEFAULT '0',
`isPublic` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DE... | true |
57d92ce659f6a4087c7667a0f660ff37eae8f896 | SQL | mghaffar89/Employee-DMS | /seed.sql | UTF-8 | 1,037 | 3.3125 | 3 | [
"MIT"
] | permissive | use employee_tracker;
INSERT INTO department
(d_name)
VALUES
('Sales'),
('Accounting'),
('Administration'),
('Warehouse'),
('Management'),
('Customer Service'),
('Human Resources');
INSERT INTO role
(title, salary, department_id)
VALUES
('Sales Lead', 100000, 1),
('Salesp... | true |
b0d1f713fa6c146574a69ffd0303bc55f59d646b | SQL | zpolari/Team8 | /SQLBackup/test.sql | UTF-8 | 9,292 | 3.140625 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : cproot
Source Server Type : MySQL
Source Server Version : 50562
Source Host : 116.255.186.125:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 50562
File Encoding : 65001
Date: 19/12/2020 18... | true |
34dc7f76c8d4533704bad212a828432bf39ae55a | SQL | zhangzhenfei/lemon | /src/main/resources/dbmigrate/acl/V0_0_3__object_identity.sql | UTF-8 | 737 | 3.3125 | 3 | [
"Apache-2.0"
] | permissive |
-------------------------------------------------------------------------------
-- object identity
-------------------------------------------------------------------------------
CREATE TABLE ACL_OBJECT_IDENTITY(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL,
REFERENCE VARC... | true |
f20ed042616f4207d3d95c5246a447c9ebd6cd28 | SQL | nyone00/Advanced_SQL_topics_MySQL | /MySQL Indexes.sql | UTF-8 | 741 | 4.1875 | 4 | [] | no_license | /*
the index of a table functions like the index of a book
- data is taken from a column of the table and is stored in a certain
order in a distinct place, called an index
SYNTAX
CREATE INDEX index_name
ON table_name (column1, column2 ....);
*/
SELECT *
FROM employees
WHERE hire_date > '2000-01-01';
CREATE INDEX i... | true |
a15d6fa08ae828f5fc1667d01c3f383344ae2c19 | SQL | kavya-affine/healthCare | /transformations/target/compiled/transformations/models/transform/schema.yml/schema_test/source_unique_customer_source_customer_CUSTOMER_NAME.sql | UTF-8 | 205 | 2.640625 | 3 | [] | no_license |
select
CUSTOMER_NAME,
count(*) as n_records
from HEALTHCARE_CUSTOMER_DATA.public_intermediate_stg.customer
where CUSTOMER_NAME is not null
group by CUSTOMER_NAME
having count(*) > 1
| true |
61c07d2a2aa60c72325d0f2070c1332994c916ce | SQL | CUBRID/cubrid-testcases | /sql/_27_banana_qa/issue_5765_timezone_support/_00_dev_cases/_02_operator/_30_weekday_with_local_tz/cases/weekday_005.sql | UTF-8 | 772 | 3.0625 | 3 | [
"BSD-3-Clause"
] | permissive | --marginal values of timestampltz/datetimeltz type
--1. marginal values: timestampltz argument
--select weekday(timestampltz'00:00:00 01/01/2014');
select if(weekday(timestampltz'00:00:00 01/01/2014')=weekday(timestampltz'00:00:00 01/01/2014'),'ok','nok');
select weekday(timestampltz'03:14:07 1/19/2038');
select wee... | true |
82085547be506c1554bac98ec1843f8466ea3cee | SQL | bornehill/AgroPetSystem | /PETDataBase/dbo/Stored Procedures/usptbMarca_Alta.sql | UTF-8 | 443 | 2.578125 | 3 | [] | no_license |
CREATE PROCEDURE usptbMarca_Alta(
@Id_Marca INT,
@Descripcion VARCHAR(100),
@UsuarioCreacion VARCHAR(31),
@FechaCreacion Datetime,
@Ret int OUT,
@MsgProceso VARCHAR(100) OUT)
AS
BEGIN
INSERT INTO tbmarcas
(Id_Marca,
Descripcion,
UsuarioCreacion,
FechaCreacion
)
VALUES
(@Id_... | true |
48068d46c4254f45729bcc89d0cc56fb132d5285 | SQL | Greshot/VTiendaCheveris | /database/vtiendacheveris_carloshurtado.sql | UTF-8 | 8,774 | 3.140625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 02-08-2016 a las 08:30:28
-- Versión del servidor: 5.6.24
-- Versión de PHP: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
342bb2ab3c379da684a75eef1ee7a07e8982824f | SQL | SandiRp/praktikum13 | /covid.sql | UTF-8 | 1,597 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 29, 2020 at 05:43 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
de9ee3ba71adecaec3c2679345faa9f7232c68fd | SQL | brunodeandrade/Sistema_Buracos | /scripts/execute_update_script.sql | UTF-8 | 1,166 | 2.921875 | 3 | [] | no_license |
/*This script has a function call that contains the relevant procedures
UPDATE methods.*/
set number_one = 1;
set number_two = 2;
set number_three = 3;
CALL sp_update_uf(number_one,"Mudou1");
CALL sp_update_uf(number_two,"Mudou2");
CALL sp_update_uf(number_three,"Mudou3");
CALL sp_update_sexo(number_one,"Masculino... | true |
71b8cd9e01868490e6dd2193bb1c6142c63e126d | SQL | trying-dev/first-steps-docker | /db/migrations/V0.4.1__company_balance_history.sql | UTF-8 | 909 | 3.40625 | 3 | [] | no_license | --
-- Table structure for table `company_balance_history`
--
DROP TABLE IF EXISTS `company_balance_history`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `company_balance_history` (
`id` int NOT NULL AUTO_INCREMENT,
`company_id` int NOT... | true |
a02547b41bc71aa92365819cda0d9c648f726260 | SQL | cherifbendahmane/centos | /Database/init_database.sql | UTF-8 | 7,630 | 3.484375 | 3 | [] | no_license | DROP TABLE IF EXISTS user_presence CASCADE;
DROP TABLE IF EXISTS user_functions CASCADE;
DROP TABLE IF EXISTS user_roles CASCADE;
DROP TABLE IF EXISTS user_informations CASCADE;
DROP TABLE IF EXISTS user_affichage CASCADE;
DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS jobs CASCADE;
DROP TABLE IF EXIST... | true |
d851240ea7f4955883c8de7123f950709abecaf7 | SQL | CodeStorm007/shopmarket | /数据库(新)/orders.sql | UTF-8 | 2,430 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50717
Source Host : localhost:3306
Source Database : sql
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-10-30 09:52:45
*/
SET FOREIGN_KEY... | true |
1c4a8923b86142ccd67e27c4af14d286b8766e6c | SQL | mehedi2592000/WT_Summer_2021 | /new_project/project1/admn .sql | UTF-8 | 3,844 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 17, 2021 at 12:27 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
168d7e9b50e53737835e138073b0943693cd2bb8 | SQL | Sean-Parkk/tobeSQLmaster | /SQL_recipe_for_data_analysis/source/12강 - 시계열에 따른 사용자 전체의 상태 변화 찾기.sql | UTF-8 | 9,860 | 4.5625 | 5 | [] | no_license | ### 등록 수의 추이와 경향 보기
SELECT
REGISTER_DATE
, COUNT(DISTINCT USER_ID) AS REGISTER_COUNT
FROM MST_USERS
GROUP BY REGISTER_DATE
ORDER BY REGISTER_DATE;
### 월별 등록 수 추이
WITH
MST_USERS_WITH_YEAR_MONTH AS (
SELECT
*
, SUBSTR(REGISTER_DATE, 1, 7) AS YEARMONTH
FROM MST_USERS
)
SELECT
YEARMONTH
, CO... | true |
c6dd612ab4414cf25d75840cd891cb3a0aeb4481 | SQL | PSWil/Pewlett-Hackard-Analysis | /Queries/Employee_Database_challenge.sql | UTF-8 | 1,213 | 4.59375 | 5 | [] | no_license | -- Join employee and title tables to create new table "retirement by title"
SELECT e.emp_no, e.first_name, e.last_name,
ti.titles, ti.from_date, ti.to_date
INTO retirement_titles
FROM employees as e
INNER JOIN titles as ti
ON e.emp_no = ti.emp_no
WHERE (e.birth_date BETWEEN '1952-01-01' AND '1955-12-31')
O... | true |
b28ee897e56ffe0ff1a6856f750f6ddfa0e8364e | SQL | Greg0109/SQL-Project | /Lesson/Null.sql | UTF-8 | 1,308 | 4 | 4 | [] | no_license | select name from teacher
where dept is null
---------------------------------
select teacher.name,dept.name from teacher
inner join dept on (teacher.dept = dept.id)
---------------------------------
select teacher.name, dept.name from teacher
left join dept on (teacher.dept=dept.id)
-------------------------... | true |
9ebfe395299bcbcd36e9b6f0ec75b43aa1f09325 | SQL | wikibus/wikibus-backend | /src/wikibus.sources.dotNetRDF/Mapping/SqlQueries/SelectBrochureAndBook.sql | UTF-8 | 767 | 2.875 | 3 | [] | no_license | SELECT [Id]
,[SourceType]
,CASE [SourceType]
WHEN 'folder' THEN 'Brochure'
WHEN 'book' THEN 'Book'
WHEN 'file' THEN 'File'
END as [Type]
,CASE [SourceType]
WHEN 'folder' THEN 'brochure'
WHEN 'book' THEN 'book'
WHEN 'file' THEN 'file'
END a... | true |
cf4017cd742b838c1f9bc4bac3161a21ac18a2c5 | SQL | Nevasca/PROJETO-ARQDESIS | /LocacaoAutomoveis/loc_automoveis_beg.sql | UTF-8 | 5,196 | 3.296875 | 3 | [] | no_license | DROP SCHEMA IF EXISTS locAutomoveisBEG;
CREATE DATABASE locAutomoveisBEG;
USE locAutomoveisBEG;
SET STORAGE_ENGINE=InnoDB;
SET NAMES 'utf8';
CREATE TABLE IF NOT EXISTS TB_CLIENTE(
ID_CLIENTE INT AUTO_INCREMENT NOT NULL,
NM_CLIENTE VARCHAR(50) NOT NULL,
CPF_CLIENTE VARCHAR(14) NOT NULL,
RG_CLIENTE VARCHAR(1... | true |
5d8918d1019637175c8f90b0e943f4a142661cdc | SQL | jbonot/ziffer | /sql/update_script_event_guests.sql | UTF-8 | 1,716 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 19, 2016 at 09:40 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
ffafb7cb645c1f7b7ef320bc9244e512415445dc | SQL | gry-kiu/Database-Practice | /ex_dml1.sql | UHC | 1,559 | 3.890625 | 4 | [] | no_license | -- 7-10
select ̵, ̸,
from ;
-- 7-11
select ̵, ̸, , , ,
from ;
-- 7-12
select *
from ;
-- 7-13
select ü
from ǰ;
-- 7-14
select all ü
from ǰ;
-- 7-15
select distinct ü
from ǰ;
-- 7-16
select ǰ, ܰ as
from ǰ;
-- 7-17
select ǰ, ܰ + 500 as " ܰ"
from ǰ;
-- 7-18
select ǰ, , ܰ
from ǰ
where ü = 'Ѻ';
-- 7-19... | true |
bb5f30b086483a6f1b157ebc21185626dcc7806f | SQL | EliaBaladron/ProyectoTienda_EliaBaladronPeral | /Curso Serbatic.sql | UTF-8 | 3,146 | 3.375 | 3 | [] | no_license | DROP DATABASE IF EXISTS `tienda_online`;
CREATE DATABASE `tienda_online` CHARACTER SET utf8mb4;
USE `tienda_online`;
CREATE TABLE `productos` (
`id` int PRIMARY KEY AUTO_INCREMENT,
`id_categoria` int,
`nombre` varchar(255),
`descripcion` varchar(255),
`precio` double,
`stock` int,
`fecha_alta` timesta... | true |
c46235a394f18f47710191e902dfbd0cdf9168f0 | SQL | eitss813/impt_module | /modules/Sitestaticpage/settings/my.sql | UTF-8 | 4,206 | 2.640625 | 3 | [] | no_license | /**
* SocialEngine
*
* @category Application_Extensions
* @package Sitestaticpage
* @copyright Copyright 2013-2014 BigStep Technologies Pvt. Ltd.
* @license http://www.socialengineaddons.com/license/
* @version $Id: my.sql 2014-02-16 5:40:21Z SocialEngineAddOns $
* @author SocialEngineAddOns
*/... | true |
2d3d7f35f3e1f57aa10817f4cb1a1d65055de940 | SQL | RalfRalf/photography | /script/oracle/oracle-create.sql | UTF-8 | 33,246 | 3.71875 | 4 | [] | no_license | --工作流流程节点设置表
CREATE TABLE TBL_CORE_ACT_NODE (
DB_ID VARCHAR2(50) NOT NULL,
PROCESSDEFINITION_KEY VARCHAR2(100) DEFAULT '',
PROCESSDEFINITION_NAME VARCHAR2(200) DEFAULT '',
ACTIVITY_ID VARCHAR2(100) DEFAULT '',
ACTIVITY_NAME VARCHAR2(200) DEFAULT '',
ACTIVITY_TYPE VARCHAR2(50) DE... | true |
e2a535aa25b859b266201242e1a3d74189f1dc69 | SQL | c4p1t4n/Projeto_Libertario | /Banco_de_dados/script_pi.sql | UTF-8 | 4,473 | 3.140625 | 3 | [] | no_license | CREATE DATABASE AustroLibertario;
use AustroLibertario;
CREATE TABLE tbAutores(
idAutor INT PRIMARY KEY AUTO_INCREMENT,
nomeAutor VARCHAR(100) NOT NULL,
nascimento DATE NOT NULL,
morte DATE
)AUTO_INCREMENT = 1000;
insert into tbAutores values (null,'John locke','1632-08-29','1704-10-28'),
(null,'David Hu... | true |
127049e0b91d45d271f3b11beea0f5de98aad3fe | SQL | ChaabaneHatem/P_33_TP_JAVA_II | /mamie_clafoutie.sql | UTF-8 | 9,392 | 3.25 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Fri Oct 6 15:15:22 2017
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... | true |
fc9f83e9c93d1dfdb8bc81e16ce97a902f704c03 | SQL | manickaa/tourismdatabase.io | /sql/DML.sql | UTF-8 | 15,837 | 4 | 4 | [
"BSD-3-Clause"
] | permissive | -- Name: GROUP-25 Aishwarya Manicka Ravichandran and Amy Robertson
-- Description: Data Manipulation queries for tourism database
--
-- SELECT query for `customers` display
--
SELECT customers.customer_ID, customers.first_name, customers.middle_name, customers.last_name,
customers.street_no, customers.city, custome... | true |
dc62e001eb4d8548b5a4c5a3a7d3522b52ddcdea | SQL | hellobuffet/MySQL | /m4_homework.sql | UTF-8 | 874 | 3.46875 | 3 | [] | no_license | desc t1;
create table t (a int, b char(10), c float);
-- 新增table--
alter table t add d varchar(30);
-- 增加欄位
alter table t add e varchar(30) first ;
-- 增加欄位於第一排
alter table t add f varchar(30) after e;
-- 增加欄位於E欄位之後
alter table t modify d varchar(50) first;
-- 修改D欄位屬性
alter table t change f g decimal(10,2);
-- 修改F欄位... | true |
5ebd9b343e1d6487e650884278633eeeb3dbe80e | SQL | VibitaS/Php_POO | /fixtures/03-meetings.sql | UTF-8 | 1,309 | 3.203125 | 3 | [] | no_license | CREATE TABLE `meetings` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`description` varchar(50) NOT NULL,
`start date` date(11) NOT NULL,
`end date` date(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `meetings` (`title`, `description`, `start dat... | true |
b9ff4baaa957c3931f9a1d80eae33b87df31e88e | SQL | ashiq4321/Atp3labexam | /labexam/online-medicine-shop.sql | UTF-8 | 2,335 | 2.84375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 27, 2020 at 07:39 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
a304d8922426ad9cafe835b6d47eeb7c1f3c28f2 | SQL | bbranquinho/wpattern-rest-cdi | /wpattern-rest-cdi/project_files/database_create.sql | UTF-8 | 1,175 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema cdi_rest
... | true |
4c461dceca76a10fce85d613ed6f7258ad0f90a5 | SQL | dav-he123/BootcampX | /4_queries/13_name_of_teachers_and_number_of_assistances.sql | UTF-8 | 357 | 3.984375 | 4 | [] | no_license | SELECT DISTINCT teachers.name as teacher, cohorts.name as cohort, count(assistance_requests.teacher_id) as total_assistances
FROM teachers
JOIN assistance_requests ON teachers.id = teacher_id
JOIN students ON students.id = student_id
JOIN cohorts ON cohorts.id = cohort_id
GROUP BY teachers.name, cohorts.name
HAVING coh... | true |
6e6cd5c05dd31ded1a12ecd98b2ea3bd50ebbeaa | SQL | Kevin-LL/AppliFrais | /DB script/gsb_frais_structure.sql | UTF-8 | 4,216 | 3.484375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.1.4
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Ven 22 Décembre 2017 à 15:30
-- Version du serveur : 5.6.15-log
-- Version de PHP : 5.4.24
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC... | true |
4056a9f9b74cbb37328ec8ef7822b75ad89071eb | SQL | fpbarthel/GLASS | /sql/neoag/neoag_depletion_aliquot.sql | UTF-8 | 4,662 | 4.15625 | 4 | [
"MIT"
] | permissive | /*
-----------------------------------------------------------------------------------
Neoantigen depletion
PostgreSQL implementation of Rooney et all (Cell 2015) neoantigen depletion method
See https://www.ncbi.nlm.nih.gov/pubmed/25594174
Authors: Fred Varn, Floris barthel
---------------------------------------------... | true |
d0dcefed5a34136b662890967cea19d654f3ca41 | SQL | hmailserver/hmailserver | /hmailserver/source/DBScripts/Upgrade5006to5100MSSQLCE.sql | UTF-8 | 3,727 | 2.75 | 3 | [] | no_license | insert into hm_settings (settingname, settingstring, settinginteger) values ('ASDKIMVerificationEnabled', '', 0)
insert into hm_settings (settingname, settingstring, settinginteger) values ('ASDKIMVerificationFailureScore', '', 5)
delete from hm_settings where settingname = 'maskpasswordsinlog'
ALTER TABLE hm_domain... | true |
25b613e43cde304b3be7471c4763a76ed2570fbb | SQL | lmckibben/Bootcampx | /4_queries/1_total_teacher_assistance_request.sql | UTF-8 | 174 | 3.515625 | 4 | [] | no_license | SELECT count(assistance_requests.id) AS total_assistance, name
FROM assistance_requests
JOIN teachers ON teacher_id = teachers.id
WHERE teachers.name = 'Waylon Boehm'
GROUP BY name | true |
2c6cd581f1d59c08fb55e929f0d3422dbb1cd9c3 | SQL | Georgi5204/php_20_21 | /02_PHP_MYSQL/11_lab4_CRUD/recipes.sql | UTF-8 | 11,941 | 3.546875 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Време на генериране: 14 март 2021 в 21:03
-- Версия на сървъра: 10.4.17-MariaDB
-- Версия на PHP: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... | true |
e2bb900a73626a834c19eb4bebbcf3958a75d88b | SQL | audeta35/chatting | /chat.sql | UTF-8 | 2,924 | 2.96875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.0.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 14, 2016 at 06:01 PM
-- Server version: 10.0.17-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
b6e4a6a036e2fce75a10ec4ae2b9c37874ac051f | SQL | rejonehridoy/DDS_Project | /Site1 Code/generate_equation.sql | UTF-8 | 1,611 | 3.71875 | 4 | [] | no_license | CREATE OR REPLACE PROCEDURE generate_equation(id IN DatasetInfo.did%TYPE,data_storage IN NUMBER)
IS
sum_x DatasetValues.X%TYPE;
sum_y DatasetValues.Y%TYPE;
avg_x DatasetValues.X%TYPE;
avg_y DatasetValues.Y%TYPE;
xx DatasetValues.X%TYPE := 0;
xy DatasetValues.Y%TYPE := 0;
a DatasetInfo.constant%TYPE;
b ... | true |
44c77fa6a51483e32cd88f9daf8be5d57c68b467 | SQL | pleymo1989/evaluationSql | /exo6.SQL | UTF-8 | 353 | 3.515625 | 4 | [] | no_license |
SELECT customers.Country FROM customers JOIN orders ON customers.CustomerID=orders.CustomerID
JOIN `order details` ON `order details`.OrderID=orders.OrderID
JOIN products ON products.ProductID=`order details`.ProductID
JOIN suppliers ON suppliers.SupplierID=products.SupplierID
WHERE suppliers.CompanyName='Exotic Liq... | true |
deb685ab39d3f33c161c7f12ab83f7718f5a2cb1 | SQL | saval/Chessable | /html/migrations/db_scheme.sql | UTF-8 | 3,412 | 3.515625 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET... | true |
154b084411a8a3cc68ae0d0ef0ae9553491653b3 | SQL | Taishi66/gretagram | /doc/MCD&UML/MCD/GRAM_SQL.sql | UTF-8 | 3,472 | 3.78125 | 4 | [] | no_license | #------------------------------------------------------------
# Script MySQL.
#------------------------------------------------------------
#------------------------------------------------------------
# Table: user
#------------------------------------------------------------
CREATE TABLE user(
id_us... | true |
90a8f8f418bbe9cea204a8ddca616d8fbab21e7d | SQL | mtnpreiss/sql_scripts | /lastsql.sql | UTF-8 | 1,751 | 3.5625 | 4 | [] | no_license | -- -----------------------------------------------------------------------------
-- lastsql.sql
-- shows sql queries for the last <n> hours in a given schema
-- and a corresponding plan for a selected query.
-- -----------------------------------------------------------------------------
prompt
prompt ****************... | true |
fd755197b628b83f8ce5a5f6a0abeff8afc0905b | SQL | laurisu/webskola-clone | /init/blog.sql | UTF-8 | 611 | 3.4375 | 3 | [] | no_license | --
-- Table structure for table `blog`
--
CREATE TABLE IF NOT EXISTS `blog` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`author` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci NOT NULL,
`content` text C... | true |
bf2938b519bc4ee50467f2b42c953fe77c16278b | SQL | ImageGuidedTherapyLab/dcefollowup | /wide.sql | UTF-8 | 886 | 2.84375 | 3 | [] | no_license | .mode csv
.import datalocation/DCE_WIDE.csv imaging
.headers on
create table longformat as
select im.MRN,im.DCE1StudyUID as StudyUID, im.DCE1UID SeriesUID, im.AUC1 as AUC from imaging im where im.DCE1UID != '' union
select im.MRN,im.DCE2StudyUID, im.DCE2UID, im.AUC2 from imaging im where im.DCE2UID != '' union
selec... | true |
8d736bc7eaa7cef4667a72727d55b7df784af184 | SQL | hamlet-rt/employees | /src/main/java/hamlet/employees/sql/CreateTables.sql | UTF-8 | 1,588 | 3.5 | 4 | [] | no_license | create table `countries`
(
`id` bigint unsigned auto_increment,
`code` varchar(50) not null,
`name` varchar(50) not null,
primary key (`id`)
);
insert into `countries` (code, name)
values ('KZ', 'Казахстан'),
('RU', 'Россия'),
('US', 'США'),
('UK', 'Великобритания'),
('... | true |
2aa7f60190ef26d929e188703f0a5a52643cc537 | SQL | htmlacademy-nodejs/338829-typoteka-3 | /scheme.sql | UTF-8 | 8,287 | 3.25 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 12.5
-- Dumped by pg_dump version 12.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
b577fca6cd434802323c1721909d9c855133753b | SQL | AllanSasi/HackerRank-Practice | /SQL/51. SQL Project Planning/SQL Project Planning.mysql | UTF-8 | 983 | 4.53125 | 5 | [] | no_license | /*
You are given a table, Projects, containing three columns: Task_ID, Start_Date and End_Date. It is guaranteed that the difference between the End_Date and the Start_Date is equal to 1 day for each row in the table.
If the End_Date of the tasks are consecutive, then they are part of the same project. Samantha is inte... | true |
021f053bfe48ab630758856ab28f96a0c7d41cef | SQL | dtmdata/dtmdropbox | /PulseBox/Load & Update Process/company5/sql/update-employee.sql | UTF-8 | 313 | 2.921875 | 3 | [] | no_license | update employee a set a.manager_id= (select b.emp_id from employee b where a.mgr_email_addr=b.email_addr)
where company_id= (select company_id from company where company_name='&my_company');
update employee a set a.manager_yn='Y' where(select count(1) from employee b where b.manager_id=a.emp_id) >0;
commit; | true |
053a392f97d1344f5202719cb828e42ea9f22b86 | SQL | alexbartley/SOCO-Test | /104909/SBXTAX4/Procedures/DATAX_TB_RULES_145.sql | UTF-8 | 1,352 | 3.078125 | 3 | [] | no_license | CREATE OR REPLACE PROCEDURE sbxtax4."DATAX_TB_RULES_145"
( taxDataProviderId IN NUMBER, runId IN OUT NUMBER)
IS
--<data_check id="145" name="Active Rules mapped to inactive Rates">
dataCheckId NUMBER := -667;
BEGIN
INSERT INTO datax_records (recorded_message, run_id)
VALUES ('DATAX_TB_RULES_145 star... | true |
d345de50d51bedf8e3cf63f4fd08bbcc8381b0b3 | SQL | sprokushev/Delphi | /MASTER/_DATABASE/Constraints/R3_CUSTOMERS_FK.sql | UTF-8 | 377 | 2.859375 | 3 | [] | no_license | --
-- Foreign Key Constraints for Table R3_CUSTOMERS
--
ALTER TABLE MASTER.R3_CUSTOMERS ADD (
CONSTRAINT CUSTOMERS_PREDPR_FK
FOREIGN KEY (PREDPR_ID)
REFERENCES MASTER.KLS_PREDPR (ID)
ENABLE NOVALIDATE);
ALTER TABLE MASTER.R3_CUSTOMERS ADD (
CONSTRAINT CUSTOMERS_VENDORS_FK
FOREIGN KEY (VENDORS_ID)
... | true |
85c0ed13ee626f75c25f0b05bb6b29624261342d | SQL | cohenjo/dbautils | /oracle/dbmon/sqls/user.sql | UTF-8 | 2,927 | 3.546875 | 4 | [] | no_license | REM ------------------------------------------------------------------------
REM REQUIREMENTS:
REM SELECT on dba_*
REM ------------------------------------------------------------------------
REM PURPOSE:
REM Show user info for a given name
REM -------------------------------------------------------------------... | true |
cb906dddc82b329d776e7b6f7bbc2e92d3c90d58 | SQL | cordwalsh/independent-project-11 | /database_backup.sql | UTF-8 | 8,707 | 2.921875 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.4
-- Dumped by pg_dump version 11.4
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
e0c20329f253640cb04e6d0d9344c4f5488dc68e | SQL | michw85/bookshop_db | /Migrations/04.Sales.sql | UTF-8 | 210 | 2.5625 | 3 | [] | no_license |
CREATE TABLE Sales(
Sales_Id INT NOT NULL IDENTITY (1,1) PRIMARY KEY,
Sales_Price INT NOT NULL,
Quantity INT NOT NULL,
Sale_Date date NOT NULL,
Books_Id INT NOT NULL,
Shops_Id INT NOT NULL
) | true |
a3ba1142f380a9f6f98142cb8f115a344a5762c4 | SQL | kmacedovarela/task-assigning-examples | /kie-server-task-assigning-user-system-db-kjar/src/main/resources/tables.sql | UTF-8 | 636 | 2.9375 | 3 | [] | no_license | -- postgres sql database structure for the DBUserSystemService implementation.
CREATE TABLE public.ta_user (
userid character varying(255) NOT NULL,
enabled smallint NOT NULL,
descritpion VARCHAR(255),
CONSTRAINT ta_user_pkey PRIMARY KEY (userid)
);
CREATE TABLE public.ta_user_group (
userid character vary... | true |
6a9ca7cbef042b4c0b2bfaf66d7628b2c519ea87 | SQL | AMilkov/B-PoC | /Dimensions/D_parent_lan_product.sql | UTF-8 | 732 | 3.125 | 3 | [] | no_license | DROP TABLE IF EXISTS BAJAJ_DM.D_parent_lan_product;
CREATE TABLE BAJAJ_DM.`D_parent_lan_product` (
id TINYINT NOT NULL,
`name` varchar(20) NOT NULL
)ENGINE=MDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS BAJAJ_DM.temporary_table;
CREATE TABLE BAJAJ_DM.temporary_table (
`id` INT NOT NULL AUTO_INCREMENT,
`name` V... | true |
52ac77847f2446aea7005f44798cd5e41a6e20c9 | SQL | AkiraTanaka-developer/Alura-Courses | /Alura/Alura - SQL_Oracle/01 introdução/CONEXÃO ORACLE XE~5.sql | UTF-8 | 491 | 2.625 | 3 | [
"MIT"
] | permissive | SELECT * FROM TB_CLIENTES;
SELECT * FROM TB_CLIENTES WHERE DATA_NASCIMENTO = '07/10/95';
SELECT * FROM TB_CLIENTES WHERE DATA_NASCIMENTO = TO_DATE('07/10/1995', 'DD/MM/YYYY');
SELECT * FROM TB_CLIENTES WHERE DATA_NASCIMENTO > TO_DATE('07/10/1995', 'DD/MM/YYYY');
SELECT * FROM TB_CLIENTES WHERE DATA_NASCIMENTO < TO_... | true |
a6ddd959861770647ceef7f4774ac7f35fe88c3c | SQL | fenngineering/sql2016-nullable-computed-column-defect | /sql2016-nullable-computed-column-defect/CalcDayOfYear.sql | UTF-8 | 171 | 2.921875 | 3 | [] | no_license | CREATE FUNCTION dbo.CalcDayOfYear
(
@CalcDate DATE
)
RETURNS SMALLINT
WITH SCHEMABINDING
AS
BEGIN
RETURN ((CONVERT(SMALLINT, DATEPART(DAYOFYEAR, @CalcDate ))))
END | true |
7935c13ef2e268f3ed0d0dc403ff0c3ec0a89fcb | SQL | turntlane/sql-2-lab | /subqueries.sql | UTF-8 | 753 | 3.5 | 4 | [] | no_license | SELECT * FROM invoice
WHERE invoice_id IN (
SELECT invoice_id FROM invoice_line WHERE unit_price > .99
)
SELECT * FROM playlist_track
WHERE playlist_id IN (
SELECT playlist_id FROM playlist WHERE name = 'Music'
)
SELECT track.name FROM track
WHERE track_id IN (
SELECT track_id FROM playlist_track
WHERE playlist... | true |
c23f0cdf117adb6e45a4928bc5d00d012f8d51d4 | SQL | Boombarm/onlinejudge | /psql/P2609_Products_by_Categories.sql | UTF-8 | 391 | 3.46875 | 3 | [] | no_license | -- PROBLEM: 2609 - Products by Categories
-- ANSWER: Accepted
-- LANGUAGE: PostgreSQL (psql 9.4.19)
-- RUNTIME: 0.002s
-- FILE SIZE: 113 Bytes
-- MEMORY: -
-- SUBMISSION: 1/9/18, 11:10:25 AM
-- AUTHOR: Teerapat Phokhonwong
-- ProblemUrl: https://www.beecrowd.com.br/judge/en/problems/view/2609
select b.name, sum(a.amou... | true |
0156d2fc65afe90c736b32e22b02f9870b429878 | SQL | chatterjeesunit/opentracing-microservices-jaeger-zipkin-demo | /order-service/src/main/resources/db/migration/V2.0__CreateOrderItems.sql | UTF-8 | 264 | 3.171875 | 3 | [] | no_license | CREATE TABLE order_items(
id SERIAL PRIMARY KEY,
order_id INT NOT NULL,
product_id uuid NOT NULL,
quantity NUMERIC NOT NULL,
unit_price NUMERIC NOT NULL,
FOREIGN KEY (order_id) REFERENCES orders(id) ON DELETE RESTRICT ON UPDATE RESTRICT
);
| true |
c2bf8166e6c2f840390efe233a2bcb77e963eda0 | SQL | fendaq/mgj_gate | /src/main/resources/sql/damengTwo/zkb/12/1206.sql | UTF-8 | 1,439 | 2.6875 | 3 | [] | no_license | alter table MIDDLE_ATTACHMENT add (ORDER_NUM number);
COMMENT ON COLUMN MIDDLE_ATTACHMENT.ORDER_NUM IS '排序';
alter table MIDDLE_ATTACHMENT add (FINAL_VERSION number);
COMMENT ON COLUMN MIDDLE_ATTACHMENT.FINAL_VERSION IS '最终版本标记';
update MIDDLE_ATTACHMENT set FINAL_VERSION = 1,PARENT_ID = 1, GROUP_LEADER_ID = ID where ... | true |
c9ffbbe255a63aa460bd3c463f86f62ba288b559 | SQL | homberghp/prepareassessment | /sql/assessment_weight_sum.sql | UTF-8 | 939 | 2.84375 | 3 | [
"Artistic-2.0"
] | permissive | --
-- 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 = public, pg_catalog;
--
-- Name: assessment_weight_sum; Type: VIEW; Schema: pub... | true |
ff8c63b55ffa913903b5e35780bdf72e7fcefd28 | SQL | Rohangowd/Big_Data_sp16 | /SQL/task4c.sql | UTF-8 | 185 | 3.390625 | 3 | [] | no_license | SELECT agent_name, SUM(f.fare_amount) AS total_revenue
FROM medallions m, fares f
WHERE m.medallion=f.medallion
GROUP BY agent_name
ORDER BY total_revenue DESC, agent_name ASC
LIMIT 10; | true |
1ad7b2ba7cbc161a2d9e1fe1892ec0ef8ad3b5e9 | SQL | cngshow/SHAMU-monitor | /jobs/alerts/a24_ack_dod_alert.sql | UTF-8 | 5,060 | 3.5625 | 4 | [] | no_license | SET serveroutput on
SET linesize 10000
SET ECHO OFF
set verify off
-- define local vars --
DECLARE
--setup
v_tz VARCHAR2(3):= '&1';
v_job_code VARCHAR2(50) := '&2';
v_last_known_status VARCHAR2(5) := '&3';
v_lookback NUMBER := &4; -- lookback in minutes
edate ... | true |
36b2e5d9a7595546cb2718d9b45de5de3d81e427 | SQL | samurairukasu/Desarrollo | /CONTROLES CABA/4 - Control - Procedimientos diarios.sql | UTF-8 | 791 | 2.921875 | 3 | [] | no_license | -- Ejecutar luego de haber realizado los controles 1 al 3 --
--Estos procedimientos deben ser ejecutados todos los dias. Esto se debe a que el WS descarga despues de las
--18.30hs todos los pagos nuevamente del dia y si hubiere algun pago en que exista turno con inspeccion para
--el mismo dia y no estaba el pago dispo... | true |
c770bc2b82dec90e93374b4c97d3b73fa39f8bc3 | SQL | keke1123/payment-test | /src/resources/data.sql | UTF-8 | 745 | 3.484375 | 3 | [] | no_license | DROP TABLE IF EXISTS PAYMENT_DATA;
DROP TABLE IF EXISTS ACCOUNT_DATA;
DROP TABLE IF EXISTS PAYMENT_SUMMARY;
CREATE TABLE PAYMENT_DATA
(
PAYMENT_ID BIGINT PRIMARY KEY,
ACCOUNT_ID BIGINT,
AMOUNT INT,
METHOD_TYPE VARCHAR(6),
ITEM_CATEGORY VARCHAR(9),
REGION VARCHAR(6)
);
CRE... | true |
1a704121296d1946e34b7f272a5a983ac17f03f0 | SQL | CityofToronto/anchorTO_DB | /ImportOracleTables2Pg.sql | UTF-8 | 1,156 | 3.34375 | 3 | [] | no_license | import foreign schema "IGE"
limit to (ige_user)
from server imaint_oracle into imaint_oracle;
import foreign schema "IGE"
limit to (ige_user_steward)
from server imaint_oracle into imaint_oracle;
import foreign schema "IGE"
limit to (ige_task, ige_transaction)
from server imaint_oracle into imaint_oracle;
import for... | true |
03aa59c61e66c2ac660b22c64590a39dc1ab2c92 | SQL | FaithMandela/QuestionThree | /projects/mhealth/database/views.sql | UTF-8 | 1,393 | 3.46875 | 3 | [] | no_license | CREATE VIEW vw_messages AS
SELECT languages.language_id, languages.language_name, message_category.message_category_id, message_category.message_category_name,
messages.message_id, messages.message_code, messages.is_before_delivery, messages.is_after_delivery, messages.week_number, messages.message_order,
mess... | true |
7b0c4d8343cebe7ada0b2d2809f5e422b0d1dc83 | SQL | gurpreet19/ec198392_wht | /Database/configuration/03_02_headless_tool/Delta_WST/SourcePackageDefinitions/ECDP_RECONCILIATION_BODY.sql | UTF-8 | 183,203 | 2.5625 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE BODY ecdp_reconciliation IS
/****************************************************************
** Package : ecdp_reconciliation, header part
**
** $Revision: 1.0 $
**
** Purpose : To reconcile the 2 runs of the royalty calculation
**
** Documentation : www.ener... | true |
dac0090c80ad682914c9ede621859d1a83aa707f | SQL | semyonov-m-y/java5 | /src/main/java/java5ee/module1/2.sql | UTF-8 | 177 | 3.84375 | 4 | [] | no_license | SELECT SUM(salary), projects.project_name FROM developers
LEFT JOIN projects ON developers.project_id = projects.id
GROUP BY project_name ORDER BY SUM(salary) DESC LIMIT 1;
| true |
ab53957152693ece59d20f00aad8335a182d8a6c | SQL | summerys/Java | /MovieMate/summerys_a5.sql | UTF-8 | 6,527 | 3.9375 | 4 | [] | no_license | DROP DATABASE if exists summerys_cinemate;
CREATE DATABASE summerys_cinemate;
USE summerys_cinemate;
CREATE TABLE Genres (
genreID int(11) primary key not null auto_increment,
genre varchar(25) not null
);
CREATE TABLE Actions (
actionID int(11) primary key not null auto_increment,
action_ varchar(25) not null... | true |
63d022d2961f5401bf07488caa38fe663f30ffbf | SQL | shawnfeldman/timescale-benchmark | /db/cpu_usage.sql | UTF-8 | 214 | 2.53125 | 3 | [
"MIT"
] | permissive | CREATE DATABASE homework;
\c homework
CREATE EXTENSION IF NOT EXISTS timescaledb;
CREATE TABLE cpu_usage(
ts TIMESTAMPTZ,
host TEXT,
usage DOUBLE PRECISION
);
SELECT create_hypertable('cpu_usage', 'ts');
| true |
473e3d169d7ef61f54e7c75c7c15006834c62b57 | SQL | huyiwill/yaoshi | /document/yaoshi.sql | UTF-8 | 48,921 | 3.78125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS `yaoshi` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
# 后台管理员表
DROP TABLE IF EXISTS `ys_admin`;
CREATE TABLE IF NOT EXISTS `ys_admin` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`account` varchar(45) NOT NULL COMMENT '账号',
`password` char(40) NOT NULL... | true |
b9a2f649d55fa40393b1ea84471a650396978e8d | SQL | pirocorp/Databases-Basics-MS-SQL-Server | /03. Built-in functions/Exercises/05. Find Towns with Name Length/Find Towns with Name Length.sql | UTF-8 | 87 | 2.875 | 3 | [
"MIT"
] | permissive | SELECT [Name]
FROM Towns
WHERE LEN([Name]) BETWEEN 5 AND 6
ORDER BY [Name] ASC | true |
0e46e4b615e018a84a01b4898ce81cb202dd654a | SQL | AlteregoBologn/jersey | /db/staging/tari/00 init.sql | UTF-8 | 12,385 | 2.9375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Sequence SEQ
--------------------------------------------------------
CREATE SEQUENCE "SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 238 CACHE 20 NOORDER NOCYCLE ;
-------------------------------------... | true |
3a08370d26f9e407f61afa926123d2dab74d56c0 | SQL | toanht15/moni | /apps/plugins/db_sql/getCpActionsByCpModuleType.sql | UTF-8 | 413 | 3.515625 | 4 | [] | no_license | SELECT
C.id cp_id, CA.*
FROM cps C
INNER JOIN cp_action_groups G ON G.cp_id = C.id AND G.del_flg = 0
INNER JOIN cp_actions CA ON CA.cp_action_group_id = G.id AND CA.del_flg = 0
WHERE
C.del_flg = 0
AND C.status in(?status?)
AND (C.permanent_flg = 1 OR C.end_date > ?end_date?)
AND (C.permanent_flg = 1... | true |
ba5db84ebd7f4162b831af546e53740f6a8e0384 | SQL | dami-gg/kickerhack | /backend/conf/evolutions/default/2.sql | UTF-8 | 860 | 3.21875 | 3 | [] | no_license | # --- !Ups
CREATE TABLE "kicker"."game" (
g_id BIGSERIAL NOT NULL PRIMARY KEY,
g_table_id BIGINT NOT NULL REFERENCES "kicker"."kickerTable" (kt_id),
g_goals_home SMALLINT NOT NULL,
g_goals_away SMALLINT NOT NULL,
g_started_on BIGINT NOT NULL,
g_finished_on BIGINT
);
CREATE TABLE "kicker"."player" (
p_id ... | true |
c516e78093024bcdfb252b15afc0b3aa7b6ee2c2 | SQL | svalentinaxoxo/SQL-Labs | /CIS260 Lab9.sql | UTF-8 | 2,202 | 4.125 | 4 | [] | no_license | --Shelby Laquitara
--Lab 9
--1. use the student space correct
SELECT DISTINCT cost
FROM student.course
WHERE cost =
(SELECT MIN(cost)
FROM student.course);
--2. --use two subquerys ??
SELECT cost
FROM STUDENT.COURSE
WHERE cost <
(SELECT cost, 1095
FROM student.course);
... | true |
6028093e571000b6d53d92ab49c9f8c45f15b3e1 | SQL | jonathan-rSantos/MySQL | /Lista 4/Atividade 4.sql | UTF-8 | 3,149 | 4.25 | 4 | [] | no_license | -- Crie um banco de dados para um serviço de um açougue, o nome do banco deverá ter o seguinte
-- nome db_cidade_das_carnes, onde o sistema trabalhará com as informações dos produtos desta empresa.
create database db_cidade_das_carnes;
use db_cidade_das_carnes;
-- O sistema trabalhará com 2 tabelas tb_produto e tb_ca... | true |
104c5adf703f1cd5858abba8cd15c25f70e9c897 | SQL | bclark8923/AnnoTree | /Database/procedures/delete_user_from_tree.sql | UTF-8 | 1,146 | 4.09375 | 4 | [] | no_license | -- --------------------------------------------------------------------------------
-- delete_user_from_tree
-- returns ??
-- --------------------------------------------------------------------------------
USE annotree;
DROP PROCEDURE IF EXISTS `delete_user_from_tree`;
DELIMITER $$
CREATE PROCEDURE `delete_user_from_... | true |
9d4fc86693132705280891b81b2dd9bf3ee8d902 | SQL | Jauntyjack/real-estate | /application/dutakota.sql | UTF-8 | 15,170 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.0.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Feb 19, 2016 at 04:16 AM
-- Server version: 5.6.26
-- PHP Version: 5.6.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
5163af956805dd98576a4679d6373d4152b5c879 | SQL | nicoleticknor/wriddit | /db/schema/00_full.sql | UTF-8 | 1,570 | 3.734375 | 4 | [] | no_license | DROP TABLE IF EXISTS users CASCADE;
DROP TABLE IF EXISTS genres CASCADE;
DROP TABLE IF EXISTS stories CASCADE;
DROP TABLE IF EXISTS contributions CASCADE;
DROP TABLE IF EXISTS story_ratings CASCADE;
DROP TABLE IF EXISTS story_genres CASCADE;
CREATE TABLE users (
id SERIAL PRIMARY KEY NOT NULL,
name VARCHAR(255) NO... | true |
c9727fe8fbe5be54d8749b3e7bfc6c69a6cc4ba2 | SQL | rizkiamor/inventaris_kim | /dbpersediaan.sql | UTF-8 | 5,232 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 19 Apr 2016 pada 13.19
-- Versi Server: 10.1.10-MariaDB
-- PHP Version: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
c41464cdb91d61643a34ce3f2af70cbd67320421 | SQL | pgspider/pgspider | /src/pl/plperl/sql/plperl_setup.sql | UTF-8 | 1,724 | 3.375 | 3 | [
"PostgreSQL"
] | permissive | --
-- Install the plperl and plperlu extensions
--
-- Before going ahead with the to-be-tested installations, verify that
-- a non-superuser is allowed to install plperl (but not plperlu) when
-- suitable permissions have been granted.
CREATE USER regress_user1;
CREATE USER regress_user2;
SET ROLE regress_user1;
CR... | true |
9d146761809d96cfcbd17927974c68702b6d893e | SQL | MahemaAzeem/MHARVR | /mharvr.sql | UTF-8 | 15,333 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 23, 2021 at 09:39 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
fc9ed4dbe572cb6e2a1332a8c5030edf9519b745 | SQL | JohnsonLz/ccv | /db.sql | UTF-8 | 771 | 3.46875 | 3 | [] | no_license | drop database if exists ccv;
create database ccv;
use ccv;
create table User (
userId int auto_increment,
userName varchar(16) not null unique,
password varchar(16) not null,
email varchar(32),
primary key(userId)
);
create table Project (
projectId int auto_increment,
projectName varchar(16) not null unique,
prima... | true |
5a87115dff7ccd7c3a590dcfca628201da3bdef3 | SQL | b0r0dat0r/sql-scripts | /get_delete.sql | UTF-8 | 520 | 3.328125 | 3 | [] | no_license | --Ищем сессии в которых идёт удаление из таблиц
SELECT 'ALTER SYSTEM KILL SESSION ''' || s.sid || ',' || s.serial# || ''' IMMEDIATE;' as s,
p.spid,
s.username,
s.program,
s.state,
s.machine,
s.command
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_... | true |
8c7b407511d2ccb99c43084d899f93ac4f0061ac | SQL | abdellani/solved-challenges | /hackerrank/sql/Weather Observation Station 9.sql | UTF-8 | 188 | 2.765625 | 3 | [] | no_license | /*
source: https://www.hackerrank.com/challenges/weather-observation-station-9/problem
*/
select distinct(city) from station where
lower(substr(city,1,1)) not in ('a', 'e', 'i', 'o', 'u')
| true |
7028e5a56edf5d1ef3b0056d61b892fda0c62aa7 | SQL | livash/AppAcademy_work | /solutions/w3/w3d5/meta/import_db.sql | UTF-8 | 446 | 3.5 | 4 | [] | no_license | CREATE TABLE owners (
id INTEGER PRIMARY KEY,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL
);
CREATE TABLE cats (
id INTEGER PRIMARY KEY,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL,
age INTEGER NOT NULL,
owner INTEGER
);
INSERT INTO owners (fname, lname)
VALUES ("Devon", "Wat... | true |
095d0df458f48a9e3db31545bf3cabdf12829598 | SQL | Competencias/fundalara | /build/scriptModeloCompleto v8.2.sql | UTF-8 | 143,473 | 3.046875 | 3 | [] | no_license | CREATE TABLE public.funcionalidad (
codigo_funconalidad INTEGER NOT NULL,
nombre VARCHAR NOT NULL,
estatus CHAR NOT NULL,
Parent_codigo_funconalidad INTEGER NOT NULL,
CONSTRAINT funcionalidad_pk PRIMARY KEY (codigo_funconalidad)
);
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.